mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 12:32:55 +00:00
Bug 855906 - SimplePush: Set pingInterval on websocket. r=dougt
This commit is contained in:
parent
c9c0f8d58c
commit
3c0ce1c33a
@ -395,6 +395,8 @@ pref("services.push.serverURL", "");
|
||||
pref("services.push.userAgentID", "");
|
||||
// exponential back-off start is 5 seconds like in HTTP/1.1
|
||||
pref("services.push.retryBaseInterval", 5000);
|
||||
// WebSocket level ping transmit interval in seconds.
|
||||
pref("services.push.websocketPingInterval", 55);
|
||||
// exponential back-off end is 20 minutes
|
||||
pref("services.push.maxRetryInterval", 1200000);
|
||||
// How long before a DOMRequest errors as timeout
|
||||
|
@ -567,6 +567,7 @@ PushService.prototype = {
|
||||
debug("serverURL: " + uri.spec);
|
||||
this._wsListener = new PushWebSocketListener(this);
|
||||
this._ws.protocol = "push-notification";
|
||||
this._ws.pingInterval = this._prefs.get("websocketPingInterval");
|
||||
this._ws.asyncOpen(uri, serverURL, this._wsListener, null);
|
||||
this._currentState = STATE_WAITING_FOR_WS_START;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user