Skip to content

Commit 00c7774

Browse files
authored
Merge pull request #1045 from xhit/type-assert
Avoid type assertion to the same type
2 parents 2da6713 + fa7ae67 commit 00c7774

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)