Closed
Bug 867614
Opened 12 years ago
Closed 11 years ago
SimplePush: register() timeout should also be considered at connection failure.
Categories
(Core :: DOM: Push Subscriptions, defect)
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: nsm, Assigned: nsm)
References
Details
Attachments
(1 file, 1 obsolete file)
3.22 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
Bug 863732 implements ping based keep-alive which will eventually discover a socket is down. But if a register() call fails in the interval between pings (tracked by requestTimeoutTimer), that should be considered as a failure to receive a ping from the server, even though the ping timer hasn't fired yet.
Ideally PushService should immediately try to reconnect.
Assignee | ||
Comment 1•12 years ago
|
||
Don't nominate for leo until more critical fixes land. This is not a deal-breaker.
Assignee | ||
Updated•12 years ago
|
Depends on: simple-push-b2g
Updated•12 years ago
|
Component: General → DOM: Push Notifications
Product: Boot2Gecko → Core
Version: unspecified → Trunk
Assignee | ||
Comment 2•11 years ago
|
||
I think the chances of a registration failing due to the server DB not being available or something are more unlikely than just having lost the connection. More importantly, the server process will still respond in that case with an error code. It might take a long time to reply if it is under real load, but in that case too it makes sense to reconnect. In such a case, once the redirection stuff is figured out, the client will be redirected to a more responsive server when it reconnects.
Attachment #805742 -
Flags: review?(doug.turner)
Comment 3•11 years ago
|
||
Comment on attachment 805742 [details] [diff] [review]
SimplePush: Failure to register should lead to socket reconnection.
Review of attachment 805742 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/push/src/PushService.jsm
@@ +354,5 @@
> + // The most likely reason for a registration request timing out is
> + // that the socket has disconnected. Best to reconnect.
> + if (requestTimedOut) {
> + this._shutdownWS();
> + this._reconnectAfterBackoff();
So, say we have two requests -- one old (defined as |duration > this._requestTimeout|) and one new.
This first time through this loop, we will set |requestTimeOut|, send a TimeoutError, and then delete the pendingRequest. The next time through, the request is too new.
After this block, we close the socket.
Should we instead call TimeoutError (or something), on all pendingRequests?
Assignee | ||
Comment 4•11 years ago
|
||
That is a good idea, although it would eventually happen anyway, this way we have more predictable state interactions.
Attachment #806064 -
Flags: review?(doug.turner)
Assignee | ||
Updated•11 years ago
|
Attachment #805742 -
Attachment is obsolete: true
Attachment #805742 -
Flags: review?(doug.turner)
Updated•11 years ago
|
Attachment #806064 -
Flags: review?(doug.turner) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•