From 11b91f91a06371989356d7461fcf90051558b54b Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Thu, 16 May 2024 09:07:04 +0100 Subject: [PATCH] fix (#1918) --- 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) } }