Skip to content

Commit beafcee

Browse files
author
安佳玮
committed
in function MySQLDriver.Open: replace errBadConnNoWrite with driver.ErrBadConn for resend while 'bad connection' happenning
1 parent 361f66e commit beafcee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (d MySQLDriver) Open(dsn string) (driver.Conn, error) {
123123
}
124124
if err = mc.writeHandshakeResponsePacket(authResp, addNUL, plugin); err != nil {
125125
mc.cleanup()
126-
return nil, err
126+
return nil, mc.markBadConn(err)
127127
}
128128

129129
// Handle response to auth packet, switch methods if possible

0 commit comments

Comments
 (0)