mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 21:39:25 +01:00
don't write to mysql while holding joinPartMutex
This commit is contained in:
parent
4472683d58
commit
282e7a4d57
@ -682,8 +682,6 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
|
||||
|
||||
client.server.logger.Debug("join", fmt.Sprintf("%s joined channel %s", details.nick, chname))
|
||||
|
||||
var message utils.SplitMessage
|
||||
|
||||
givenMode := func() (givenMode modes.Mode) {
|
||||
channel.joinPartMutex.Lock()
|
||||
defer channel.joinPartMutex.Unlock()
|
||||
@ -707,6 +705,10 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
|
||||
|
||||
channel.regenerateMembersCache()
|
||||
|
||||
return
|
||||
}()
|
||||
|
||||
var message utils.SplitMessage
|
||||
// no history item for fake persistent joins
|
||||
if rb != nil {
|
||||
message = utils.MakeMessage("")
|
||||
@ -720,9 +722,6 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
|
||||
channel.AddHistoryItem(histItem)
|
||||
}
|
||||
|
||||
return
|
||||
}()
|
||||
|
||||
client.addChannel(channel)
|
||||
|
||||
var modestr string
|
||||
|
Loading…
Reference in New Issue
Block a user