Fix: SASL not firing off

This commit is contained in:
kayos@tcp.direct 2022-03-19 13:25:56 -07:00
parent 640d183c1b
commit ac38ef0258
Signed by: kayos
GPG Key ID: 4B841471B4BEE979
2 changed files with 4 additions and 2 deletions

View File

@ -17,8 +17,8 @@ import (
func (c *Client) registerBuiltins() {
c.debug.Print("registering built-in handlers")
c.mu.Lock()
defer c.mu.Unlock()
c.Handlers.mu.Lock()
defer c.Handlers.mu.Unlock()
// Built-in things that should always be supported.
c.Handlers.register(true, true, RPL_WELCOME, HandlerFunc(handleConnect))

View File

@ -214,6 +214,8 @@ type execStack struct {
// Please note that there is no specific order/priority for which the handlers
// are executed.
func (c *Caller) exec(command string, bg bool, client *Client, event *Event) {
c.mu.RLock()
defer c.mu.RUnlock()
// Build a stack of handlers which can be executed concurrently.
var stack []execStack