mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-21 05:46:03 +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() {
|
func disconnect() {
|
||||||
connection.send(content: nil, isComplete: true, completion: .contentProcessed { _ in
|
connection.send(content: nil, isComplete: true, completion: .contentProcessed { _ in
|
||||||
self.handleConnectionClosure()
|
|
||||||
})
|
})
|
||||||
|
self.handleConnectionClosure()
|
||||||
connectionClosed = true
|
connectionClosed = true
|
||||||
|
connection.stateUpdateHandler = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func sendDisconnectionAndDisconnect() throws {
|
func sendDisconnectionAndDisconnect() throws {
|
||||||
|
|||||||
Reference in new issue
Block a user