From f234f723f021a3070782ed49ba26983ccda31263 Mon Sep 17 00:00:00 2001 From: Nick Rosbrook Date: Mon, 4 Nov 2024 21:40:39 -0500 Subject: [PATCH] events: do not unregister events in Close() The server side will just stop sending event notifications when the client disconnects. Remove this extra step. --- vici/events.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/vici/events.go b/vici/events.go index 78d4bf5..b4b287b 100644 --- a/vici/events.go +++ b/vici/events.go @@ -74,13 +74,6 @@ func newEventListener(cc *clientConn) *eventListener { // Close closes the event channel. func (el *eventListener) Close() error { - // This call interacts with charon, so get it - // done first. Then, we can stop the listen - // goroutine. - if err := el.unregisterEvents(nil, true); err != nil { - return err - } - if el.cc != nil { el.cc.Close() el.cc = nil