From fd7d2edcdb9abe46d8af4b439b663a67919b5758 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Wed, 15 May 2024 17:46:25 +0100 Subject: [PATCH] fix --- go/host/events/logs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go/host/events/logs.go b/go/host/events/logs.go index ac57b69fdf..97a2914be3 100644 --- a/go/host/events/logs.go +++ b/go/host/events/logs.go @@ -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 { @@ -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) } }