forked from External/ergo
fix #1155
This commit is contained in:
parent
a7107bfb67
commit
70f533ee07
4 changed files with 33 additions and 30 deletions
|
|
@ -418,6 +418,14 @@ func (client *Client) detailsNoMutex() (result ClientDetails) {
|
|||
return
|
||||
}
|
||||
|
||||
func (client *Client) UpdateActive(session *Session) {
|
||||
now := time.Now().UTC()
|
||||
client.stateMutex.Lock()
|
||||
defer client.stateMutex.Unlock()
|
||||
client.lastActive = now
|
||||
session.lastActive = now
|
||||
}
|
||||
|
||||
func (channel *Channel) Name() string {
|
||||
channel.stateMutex.RLock()
|
||||
defer channel.stateMutex.RUnlock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue