From 86afa8a206f0e3ea3f67cb5d2c9c84d970238c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6ttger?= Date: Sun, 5 Oct 2025 13:07:10 +0200 Subject: [PATCH] Fix: Connection not cleaned up after unexpected close be peer --- NearbyShare/Connection/NearbyConnection.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NearbyShare/Connection/NearbyConnection.swift b/NearbyShare/Connection/NearbyConnection.swift index 3ee99be..981bac2 100644 --- a/NearbyShare/Connection/NearbyConnection.swift +++ b/NearbyShare/Connection/NearbyConnection.swift @@ -173,6 +173,7 @@ class NearbyConnection { self.connectionClosedByPeer { self.lastError = NearbyError.protocolError("Error.ClosedByPeer".localized()) self.disconnect() + self.connection.cancel() } return } @@ -220,6 +221,7 @@ class NearbyConnection { self.connectionClosedByPeer { self.lastError = NearbyError.protocolError("Error.ClosedByPeer".localized()) self.disconnect() + self.connection.cancel() } return