Skip to content

Commit

Permalink
Fix panic if bridge is stopped before websocket connects
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 30, 2023
1 parent 4dc2cc3 commit b7c0e6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/signalmeow/receiving.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ func StopReceiveLoops(d *Device) error {
}()
authErr := d.Connection.AuthedWS.Close()
unauthErr := d.Connection.UnauthedWS.Close()
d.Connection.WSCancel()
if d.Connection.WSCancel != nil {
d.Connection.WSCancel()
}
if authErr != nil {
return authErr
}
Expand Down

0 comments on commit b7c0e6e

Please sign in to comment.