Browse Source

more race conditions

tags/v0.1.0
Jeremy Latt 10 years ago
parent
commit
29df88fb7a
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      irc/channel.go

+ 3
- 0
irc/channel.go View File

@@ -164,7 +164,10 @@ func (channel *Channel) ModeString() (str string) {
164 164
 }
165 165
 
166 166
 func (channel *Channel) Join(client *Client) {
167
+	channel.mutex.Lock()
167 168
 	channel.members.Add(client)
169
+	channel.mutex.Unlock()
170
+
168 171
 	client.channels.Add(channel)
169 172
 	reply := RplJoin(client, channel)
170 173
 	client.Reply(reply)

Loading…
Cancel
Save