@@ -100,6 +100,21 @@ func (s *State) ConnectedCount() int64 {
|
||||
return int64(len(s.presence))
|
||||
}
|
||||
|
||||
// ForgetClient removes non-durable runtime state for an identity that was
|
||||
// deleted by the admin profile cleanup tool. The caller must only pass clients
|
||||
// that are currently disconnected.
|
||||
func (s *State) ForgetClient(clientID string) {
|
||||
s.mu.Lock()
|
||||
delete(s.presence, clientID)
|
||||
delete(s.selected, clientID)
|
||||
for k := range s.guesses {
|
||||
if k.ClientID == clientID {
|
||||
delete(s.guesses, k)
|
||||
}
|
||||
}
|
||||
s.mu.Unlock()
|
||||
}
|
||||
|
||||
func (s *State) SetTaskSelection(clientID, taskID string) {
|
||||
s.mu.Lock()
|
||||
if taskID == "" {
|
||||
|
||||
Reference in New Issue
Block a user