mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-22 22:36:01 +00:00
Fix: Connection not cleaned up after FIN was sent
This commit is contained in:
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() {
|
private func receiveFrameAsync() {
|
||||||
connection.receive(minimumIncompleteLength: 4, maximumLength: 4) { content, _, isComplete, error in
|
connection.receive(minimumIncompleteLength: 4, maximumLength: 4) { content, _, isComplete, error in
|
||||||
if self.connectionClosed {
|
if self.connectionClosed {
|
||||||
|
log("[NearbyConnection \(self.id)] Received FIN from peer, connection closed.")
|
||||||
|
self.connection.cancel()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if isComplete {
|
if isComplete {
|
||||||
@@ -201,6 +203,8 @@ class NearbyConnection {
|
|||||||
private func receiveFrameAsync(length: UInt32) {
|
private func receiveFrameAsync(length: UInt32) {
|
||||||
connection.receive(minimumIncompleteLength: Int(length), maximumLength: Int(length)) { [self] content, _, isComplete, _ in
|
connection.receive(minimumIncompleteLength: Int(length), maximumLength: Int(length)) { [self] content, _, isComplete, _ in
|
||||||
if self.connectionClosed {
|
if self.connectionClosed {
|
||||||
|
log("[NearbyConnection \(self.id)] Received FIN from peer, connection closed.")
|
||||||
|
connection.cancel()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if isComplete {
|
if isComplete {
|
||||||
|
|||||||
@@ -1239,7 +1239,7 @@
|
|||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SHARED_BUILD = 75;
|
SHARED_BUILD = 76;
|
||||||
SHARED_VERSION = 2.4.2;
|
SHARED_VERSION = 2.4.2;
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
@@ -1302,7 +1302,7 @@
|
|||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SHARED_BUILD = 75;
|
SHARED_BUILD = 76;
|
||||||
SHARED_VERSION = 2.4.2;
|
SHARED_VERSION = 2.4.2;
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
|||||||
Reference in new issue
Block a user