mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 08:29:25 +01:00
Fix possible data race (irc). Closes #693
This commit is contained in:
parent
e3cb665d92
commit
8548b69e6e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user