Skip to content

Commit

Permalink
Merge pull request #1045 from xhit/type-assert
Browse files Browse the repository at this point in the history
Avoid type assertion to the same type
  • Loading branch information
maddyblue committed May 28, 2021
2 parents 2da6713 + fa7ae67 commit 00c7774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion error.go
Expand Up @@ -499,7 +499,7 @@ func (cn *conn) errRecover(err *error) {
cn.setBad()
*err = driver.ErrBadConn
case error:
if v == io.EOF || v.(error).Error() == "remote error: handshake failure" {
if v == io.EOF || v.Error() == "remote error: handshake failure" {
*err = driver.ErrBadConn
} else {
*err = v
Expand Down

0 comments on commit 00c7774

Please sign in to comment.