3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-26 12:42:50 +01:00

accounts: Release SASL lock after finishing auth

This commit is contained in:
Daniel Oaks 2016-10-16 14:01:40 +10:00
parent e643c2101f
commit b33cbd311c

View File

@ -156,12 +156,15 @@ func authenticateHandler(server *Server, client *Client, msg ircmsg.IrcMessage)
return false
}
// sasl is being done now by the handler, so we empty the client's vars now
// let the SASL handler do its thing
exiting := handler(server, client, client.saslMechanism, data)
// wait 'til SASL is done before emptying the sasl vars
client.saslInProgress = false
client.saslMechanism = ""
client.saslValue = ""
return handler(server, client, client.saslMechanism, data)
return exiting
}
// authPlainHandler parses the SASL PLAIN mechanism.