Skip to content

Commit

Permalink
CONJS-163 authentication plugin failing doesn't always return an error
Browse files Browse the repository at this point in the history
when connecting with authentication plugin, it occurs that connection hangs on creation.
  • Loading branch information
rusher committed Mar 9, 2021
1 parent c489d89 commit cabfaaf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/cmd/handshake/handshake.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class Handshake extends Command {
//* OK_Packet - authentication succeeded
//*********************************************************************************************************
case 0x00:
this.plugin.onPacketReceive = null;
packet.skip(1); //skip header
packet.skipLengthCodedNumber(); //skip affected rows
packet.skipLengthCodedNumber(); //skip last insert id
Expand All @@ -124,6 +125,7 @@ class Handshake extends Command {
//* ERR_Packet
//*********************************************************************************************************
case 0xff:
this.plugin.onPacketReceive = null;
const authErr = packet.readError(info, this.displaySql());
authErr.fatal = true;
return this.plugin.throwError(authErr, info);
Expand Down

0 comments on commit cabfaaf

Please sign in to comment.