Skip to content

Commit

Permalink
fix (#1918)
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene authored May 16, 2024
1 parent b951253 commit 11b91f9
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 11b91f9

Please sign in to comment.