1
0
Fork 0
forked from External/ergo
This commit is contained in:
Shivaram Lingamneni 2020-06-29 04:32:39 -04:00
parent a7107bfb67
commit 70f533ee07
4 changed files with 33 additions and 30 deletions

View file

@ -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()