From b33cbd311c4b02a11e123a6dfc4e490d650d60c8 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Sun, 16 Oct 2016 14:01:40 +1000 Subject: [PATCH] accounts: Release SASL lock after finishing auth --- irc/accounts.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/irc/accounts.go b/irc/accounts.go index fb1316fb..4b42f197 100644 --- a/irc/accounts.go +++ b/irc/accounts.go @@ -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.