From 8548b69e6ec3b36521c6881a5d2bcb133012b6d9 Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 24 Jan 2019 21:51:52 +0100 Subject: Fix possible data race (irc). Closes #693 --- bridge/irc/irc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index cad0bdf8..e134fdad 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -85,10 +85,10 @@ func (b *Birc) Connect() error { i.Handlers.Add(girc.RPL_WELCOME, b.handleNewConnection) i.Handlers.Add(girc.RPL_ENDOFMOTD, b.handleOtherAuth) i.Handlers.Add(girc.ALL_EVENTS, b.handleOther) + b.i = i go b.doConnect() - b.i = i err = <-b.connected if err != nil { return fmt.Errorf("connection failed %s", err) -- cgit v1.2.3