forked from External/ergo
RESUME should end cap negotiation without requiring CAP LS
This commit is contained in:
parent
fef58bb935
commit
35abe7940a
3 changed files with 67 additions and 68 deletions
|
|
@ -127,6 +127,16 @@ func (client *Client) Registered() bool {
|
|||
return client.registered
|
||||
}
|
||||
|
||||
func (client *Client) SetRegistered() {
|
||||
// `registered` is only written from the client's own goroutine, but may be
|
||||
// read from other goroutines; therefore, the client's own goroutine may read
|
||||
// the value without synchronization, but must write it with synchronization,
|
||||
// and other goroutines must read it with synchronization
|
||||
client.stateMutex.Lock()
|
||||
client.registered = true
|
||||
client.stateMutex.Unlock()
|
||||
}
|
||||
|
||||
func (client *Client) Destroyed() bool {
|
||||
client.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue