Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: disksing <[email protected]>
  • Loading branch information
disksing committed Oct 30, 2023
1 parent b353ff0 commit c8c69ce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/proxy/backend/authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,19 +226,22 @@ loop:
}
return err
}
var packetErr error
if serverPkt[0] == pnet.ErrHeader.Byte() {
err = pnet.ParseErrorPacket(serverPkt)
if handshakeHandler.HandleHandshakeErr(cctx, err.(*gomysql.MyError)) {
packetErr = pnet.ParseErrorPacket(serverPkt)
if handshakeHandler.HandleHandshakeErr(cctx, packetErr.(*gomysql.MyError)) {
logger.Warn("handle handshake error, start reconnect", zap.Error(err))
backendIO.Close()
goto RECONNECT
}
return err
}
err = clientIO.WritePacket(serverPkt, true)
if err != nil {
return err
}
if packetErr != nil {
return packetErr
}

pktIdx++
switch serverPkt[0] {
Expand Down

0 comments on commit c8c69ce

Please sign in to comment.