Fix #855
This commit is contained in:
parent
5cfc97386a
commit
d251b4de87
@ -536,8 +536,11 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
pongsMissed += 1
|
pongsMissed += 1
|
||||||
write("", withType: .ping, withData: [])
|
write("", withType: .ping, withData: [])
|
||||||
|
|
||||||
engineQueue.asyncAfter(deadline: DispatchTime.now() + .milliseconds(pingInterval)) {[weak self] in
|
engineQueue.asyncAfter(deadline: DispatchTime.now() + .milliseconds(pingInterval)) {[weak self, id = self.sid] in
|
||||||
self?.sendPing()
|
// Make sure not to ping old connections
|
||||||
|
guard let this = self, this.sid == id else { return }
|
||||||
|
|
||||||
|
this.sendPing()
|
||||||
}
|
}
|
||||||
|
|
||||||
client?.engineDidSendPing()
|
client?.engineDidSendPing()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user