Don't need to write DispatchTime

This commit is contained in:
Erik Little 2018-08-29 10:25:09 -04:00
parent d632135289
commit 25df8b66fc
No known key found for this signature in database
GPG Key ID: 62F837E56F4E9320

View File

@ -546,7 +546,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
pongsMissed += 1 pongsMissed += 1
write("", withType: .ping, withData: []) write("", withType: .ping, withData: [])
engineQueue.asyncAfter(deadline: DispatchTime.now() + .milliseconds(pingInterval)) {[weak self, id = self.sid] in engineQueue.asyncAfter(deadline: .now() + .milliseconds(pingInterval)) {[weak self, id = self.sid] in
// Make sure not to ping old connections // Make sure not to ping old connections
guard let this = self, this.sid == id else { return } guard let this = self, this.sid == id else { return }