diff --git a/irc/client.go b/irc/client.go index 2d920786..fab3d6a1 100644 --- a/irc/client.go +++ b/irc/client.go @@ -1624,6 +1624,7 @@ func (client *Client) performWrite() { dirtyBits := client.dirtyBits client.dirtyBits = 0 account := client.account + lastSeen := client.lastSeen client.stateMutex.Unlock() if account == "" { @@ -1640,9 +1641,6 @@ func (client *Client) performWrite() { client.server.accounts.saveChannels(account, channelNames) } if (dirtyBits & IncludeLastSeen) != 0 { - client.stateMutex.RLock() - lastSeen := client.lastSeen - client.stateMutex.RUnlock() client.server.accounts.saveLastSeen(account, lastSeen) } }