mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 10:10:08 -08:00
simplify read of lastSeen
This commit is contained in:
parent
e7c1800893
commit
d72037725b
1 changed files with 1 additions and 3 deletions
|
|
@ -1624,6 +1624,7 @@ func (client *Client) performWrite() {
|
||||||
dirtyBits := client.dirtyBits
|
dirtyBits := client.dirtyBits
|
||||||
client.dirtyBits = 0
|
client.dirtyBits = 0
|
||||||
account := client.account
|
account := client.account
|
||||||
|
lastSeen := client.lastSeen
|
||||||
client.stateMutex.Unlock()
|
client.stateMutex.Unlock()
|
||||||
|
|
||||||
if account == "" {
|
if account == "" {
|
||||||
|
|
@ -1640,9 +1641,6 @@ func (client *Client) performWrite() {
|
||||||
client.server.accounts.saveChannels(account, channelNames)
|
client.server.accounts.saveChannels(account, channelNames)
|
||||||
}
|
}
|
||||||
if (dirtyBits & IncludeLastSeen) != 0 {
|
if (dirtyBits & IncludeLastSeen) != 0 {
|
||||||
client.stateMutex.RLock()
|
|
||||||
lastSeen := client.lastSeen
|
|
||||||
client.stateMutex.RUnlock()
|
|
||||||
client.server.accounts.saveLastSeen(account, lastSeen)
|
client.server.accounts.saveLastSeen(account, lastSeen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue