Skip to content

Commit 943264b

Browse files
ignore errors returned by SetKeepAlive (#1448)
Signed-off-by: Achille Roussel <[email protected]>
1 parent cf948e4 commit 943264b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

connector.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,7 @@ func (c *connector) Connect(ctx context.Context) (driver.Conn, error) {
100100
// Enable TCP Keepalives on TCP connections
101101
if tc, ok := mc.netConn.(*net.TCPConn); ok {
102102
if err := tc.SetKeepAlive(true); err != nil {
103-
// Don't send COM_QUIT before handshake.
104-
mc.netConn.Close()
105-
mc.netConn = nil
106-
return nil, err
103+
c.cfg.Logger.Print(err)
107104
}
108105
}
109106

0 commit comments

Comments
 (0)