mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Avoid calling disconnect twice
This commit is contained in:
1 parent
f3f6616280
commit
20af028cc3
1 file changed
+2
-1
@@ -411,9 +411,10 @@ class NearbyConnection {
|
||||
|
||||
func disconnect() {
|
||||
connection.send(content: nil, isComplete: true, completion: .contentProcessed { _ in
|
||||
self.handleConnectionClosure()
|
||||
})
|
||||
self.handleConnectionClosure()
|
||||
connectionClosed = true
|
||||
connection.stateUpdateHandler = nil
|
||||
}
|
||||
|
||||
func sendDisconnectionAndDisconnect() throws {
|
||||
|
||||
Reference in new issue
Block a user