From 9a03c8673aa7de09d0f7910dfdc1dd7467bc1e51 Mon Sep 17 00:00:00 2001 From: yokonao Date: Thu, 1 Aug 2024 05:34:08 +0900 Subject: [PATCH 1/2] Check mysqlConnector.canceled.Value when failed to TLS handshake --- packets.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packets.go b/packets.go index ccdd532b..5ca6491a 100644 --- a/packets.go +++ b/packets.go @@ -352,6 +352,9 @@ func (mc *mysqlConn) writeHandshakeResponsePacket(authResp []byte, plugin string // Switch to TLS tlsConn := tls.Client(mc.netConn, mc.cfg.TLS) if err := tlsConn.Handshake(); err != nil { + if cerr := mc.canceled.Value(); cerr != nil { + return cerr + } return err } mc.netConn = tlsConn From 20f446faaef1b68f6d724b4339258a8e7d5fee44 Mon Sep 17 00:00:00 2001 From: yokonao Date: Thu, 1 Aug 2024 05:36:50 +0900 Subject: [PATCH 2/2] Add myself to AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index bab66a3b..287176fb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -81,6 +81,7 @@ Lunny Xiao Luke Scott Maciej Zimnoch Michael Woolnough +Nao Yokotsuka Nathanial Murphy Nicola Peduzzi Oliver Bone