Fix: Connection not cleaned up after FIN was sent

This commit is contained in:
Leon Böttger committed 2025-10-05 12:17:34 +02:00
1 parent 4ae1663779
commit dda001cb1a
5 files changed
+6 -2

No files matched your search

Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -164,6 +164,8 @@ class NearbyConnection {
private func receiveFrameAsync() {
connection.receive(minimumIncompleteLength: 4, maximumLength: 4) { content, _, isComplete, error in
if self.connectionClosed {
log("[NearbyConnection \(self.id)] Received FIN from peer, connection closed.")
self.connection.cancel()
return
}
if isComplete {
@@ -201,6 +203,8 @@ class NearbyConnection {
private func receiveFrameAsync(length: UInt32) {
connection.receive(minimumIncompleteLength: Int(length), maximumLength: Int(length)) { [self] content, _, isComplete, _ in
if self.connectionClosed {
log("[NearbyConnection \(self.id)] Received FIN from peer, connection closed.")
connection.cancel()
return
}
if isComplete {
+2 -2
View File
@@ -1239,7 +1239,7 @@
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SHARED_BUILD = 75;
SHARED_BUILD = 76;
SHARED_VERSION = 2.4.2;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
@@ -1302,7 +1302,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SHARED_BUILD = 75;
SHARED_BUILD = 76;
SHARED_VERSION = 2.4.2;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_COMPILATION_MODE = wholemodule;