Skip to content

Commit

Permalink
halved time between connectiontimeout sending ping (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Lees11 authored Sep 19, 2018
1 parent 61b80ba commit 1c6d026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/KituraWebSocket/WebSocketConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public class WebSocketConnection {
guard let timer = self.timer else {
return
}
let timeoutInterval: DispatchTimeInterval = DispatchTimeInterval.seconds(connectionTimeout)
let timeoutInterval: DispatchTimeInterval = DispatchTimeInterval.milliseconds(connectionTimeout * 500)
timer.schedule(deadline: .now(), repeating: timeoutInterval, leeway: DispatchTimeInterval.milliseconds(connectionTimeout * 50))
timer.setEventHandler(handler: { [weak self] in
guard let strongSelf = self,
Expand Down

0 comments on commit 1c6d026

Please sign in to comment.