Skip to content

Commit 07bd4e3

Browse files
committed
Don't return ErrBadConn on a network error
This has been bad behavior for a long time and no one has brought up any reasons not to change it in #422. This is a more general fix than in #728. Fixes #422 Closes #728
1 parent b75c132 commit 07bd4e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

error.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,8 @@ func (c *conn) errRecover(err *error) {
488488
*err = v
489489
}
490490
case *net.OpError:
491-
*err = driver.ErrBadConn
491+
c.bad = true
492+
*err = v
492493
case error:
493494
if v == io.EOF || v.(error).Error() == "remote error: handshake failure" {
494495
*err = driver.ErrBadConn

0 commit comments

Comments
 (0)