Merge pull request 'Prevent Deadlock when Logging Protocol Engine Stopped' (#406) from p2p-interim-new-storage into master
continuous-integration/drone/push Build is pending Details

Reviewed-on: #406
This commit is contained in:
Dan Ballard 2021-11-27 00:15:01 +00:00
commit 7f40ea2b51
1 changed files with 2 additions and 1 deletions

View File

@ -916,7 +916,8 @@ func (cp *cwtchPeer) eventHandler() {
case event.ProtocolEngineStopped:
cp.mutex.Lock()
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()
case event.EncryptedGroupMessage: