Oops - need to multiply instead of divide to get accurate representation of delay timeout in nanoseconds.
This commit is contained in:
parent
3492b59707
commit
8748e6f8cf
|
@ -101,7 +101,7 @@ class SafariExtensionHandler: SFSafariExtensionHandler {
|
|||
// Capture the uniqueValidationID to ensure it doesn't change out from under us on a future call
|
||||
activePage.dispatchMessageToScript(withName: "ping", userInfo: ["validationID": uniqueValidationID])
|
||||
|
||||
let pongTimeoutInNanoseconds = Int(NSEC_PER_SEC / UInt64(1))
|
||||
let pongTimeoutInNanoseconds = Int(NSEC_PER_SEC * UInt64(1))
|
||||
let timeoutDeadline = DispatchTime.now() + DispatchTimeInterval.nanoseconds(pongTimeoutInNanoseconds)
|
||||
DispatchQueue.main.asyncAfter(deadline: timeoutDeadline, execute: { [timedOutValidationID = uniqueValidationID] in
|
||||
SafariExtensionHandler.callValidationHandler(forHandlerID: timedOutValidationID, withShouldValidate:false)
|
||||
|
|
Loading…
Reference in New Issue