From 29df88fb7a9208cdb443ad79905bff27845ccb16 Mon Sep 17 00:00:00 2001 From: Jeremy Latt Date: Fri, 14 Feb 2014 09:00:49 -0800 Subject: [PATCH] more race conditions --- irc/channel.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/irc/channel.go b/irc/channel.go index 900d017a..7fd9c1cd 100644 --- a/irc/channel.go +++ b/irc/channel.go @@ -164,7 +164,10 @@ func (channel *Channel) ModeString() (str string) { } func (channel *Channel) Join(client *Client) { + channel.mutex.Lock() channel.members.Add(client) + channel.mutex.Unlock() + client.channels.Add(channel) reply := RplJoin(client, channel) client.Reply(reply)