Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed May 15, 2024
1 parent b951253 commit fd7d2ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go/host/events/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (l *LogEventManager) Unsubscribe(id rpc.ID) {
}
l.subscriptionMutex.RLock()
logSubscription, found := l.subscriptions[id]
close(logSubscription.ch)
ch := logSubscription.ch
l.subscriptionMutex.RUnlock()

if found {
Expand All @@ -78,6 +78,7 @@ func (l *LogEventManager) Unsubscribe(id rpc.ID) {
if enclaveUnsubErr != nil {
l.logger.Error("The subscription management between the host and the enclave is out of sync", log.SubIDKey, id, log.ErrKey, enclaveUnsubErr)
}
close(ch)
}
}

Expand Down

0 comments on commit fd7d2ed

Please sign in to comment.