Skip to content

Commit fa7ae67

Browse files
committed
Avoid type assertion to the same type
1 parent 2da6713 commit fa7ae67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ func (cn *conn) errRecover(err *error) {
499499
cn.setBad()
500500
*err = driver.ErrBadConn
501501
case error:
502-
if v == io.EOF || v.(error).Error() == "remote error: handshake failure" {
502+
if v == io.EOF || v.Error() == "remote error: handshake failure" {
503503
*err = driver.ErrBadConn
504504
} else {
505505
*err = v

0 commit comments

Comments
 (0)