Skip to content

Commit

Permalink
fix crash on nordvpn connect
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszWojciechO committed Dec 20, 2024
1 parent 05055f4 commit 0ca78b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon/vpn/quench/libquench.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ func (o *Observer) SubscribeToEvents(ctx context.Context) <-chan vpn.State {
o.mu.Lock()
defer o.mu.Unlock()

close(o.eventsChan)
if o.eventsChan != nil {
close(o.eventsChan)
}

eventsChan := make(chan vpn.State)
o.eventsChan = eventsChan
Expand Down

0 comments on commit 0ca78b0

Please sign in to comment.