From d3d2eaa54cc6767524fd6586b8220a926eb9603e Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 15 Apr 2024 15:02:50 -0700 Subject: [PATCH] clear out availablePeers on terminating browser --- .../AutomergeRepo/Networking/Providers/PeerToPeerProvider.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/AutomergeRepo/Networking/Providers/PeerToPeerProvider.swift b/Sources/AutomergeRepo/Networking/Providers/PeerToPeerProvider.swift index d742cc3..8479b9a 100644 --- a/Sources/AutomergeRepo/Networking/Providers/PeerToPeerProvider.swift +++ b/Sources/AutomergeRepo/Networking/Providers/PeerToPeerProvider.swift @@ -289,6 +289,7 @@ public actor PeerToPeerProvider: NetworkProvider { await disconnect() listener?.cancel() listener = nil + availablePeerPublisher.send([]) browserStatePublisher.send(.setup) listenerStatePublisher.send(.setup) }