Skip to content

Commit

Permalink
sets peered=false on disconnect() (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
heckj authored May 9, 2024
1 parent 171ef84 commit 388f9f8
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public final class WebSocketProvider: NetworkProvider {

/// Disconnect and terminate any existing connection.
public func disconnect() async {
peered = false
webSocketTask?.cancel(with: .normalClosure, reason: nil)
webSocketTask = nil
ongoingReceiveMessageTask?.cancel()
Expand Down

0 comments on commit 388f9f8

Please # to comment.