|
@@ -97,14 +97,8 @@ func (client *Client) AddSession(session *Session) (success bool) {
|
97
|
97
|
defer client.stateMutex.Unlock()
|
98
|
98
|
|
99
|
99
|
// client may be dying and ineligible to receive another session
|
100
|
|
- switch client.brbTimer.state {
|
101
|
|
- case BrbDisabled:
|
102
|
|
- if len(client.sessions) == 0 {
|
103
|
|
- return false
|
104
|
|
- }
|
105
|
|
- case BrbDead:
|
|
100
|
+ if client.destroyed {
|
106
|
101
|
return false
|
107
|
|
- // default: BrbEnabled or BrbSticky, proceed
|
108
|
102
|
}
|
109
|
103
|
// success, attach the new session to the client
|
110
|
104
|
session.client = client
|