Skip to content

Commit

Permalink
events: do not unregister events in Close()
Browse files Browse the repository at this point in the history
The server side will just stop sending event notifications when the
client disconnects. Remove this extra step.
  • Loading branch information
enr0n committed Nov 5, 2024
1 parent 7e1e56b commit f234f72
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions vici/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f234f72

Please sign in to comment.