Prevent Deadlock when Logging Protocol Engine Stopped
This commit is contained in:
parent
e96d31302c
commit
8763be1230
|
@ -916,7 +916,8 @@ func (cp *cwtchPeer) eventHandler() {
|
||||||
case event.ProtocolEngineStopped:
|
case event.ProtocolEngineStopped:
|
||||||
cp.mutex.Lock()
|
cp.mutex.Lock()
|
||||||
cp.listenStatus = false
|
cp.listenStatus = false
|
||||||
log.Infof("Protocol engine for %v has stopped listening", cp.GetOnion())
|
onion, _ := cp.storage.LoadProfileKeyValue(TypeAttribute, attr.PublicScope.ConstructScopedZonedPath(attr.ProfileZone.ConstructZonedPath(constants.Onion)).ToString())
|
||||||
|
log.Infof("Protocol engine for %s has stopped listening", onion)
|
||||||
cp.mutex.Unlock()
|
cp.mutex.Unlock()
|
||||||
case event.EncryptedGroupMessage:
|
case event.EncryptedGroupMessage:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue