Closed
Bug 795816
Opened 12 years ago
Closed 9 years ago
Create additional TCP connections after going back from offline
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: sinker, Assigned: sinker)
References
Details
Attachments
(1 file)
(deleted),
patch
|
mcmanus
:
review+
unusualtears
:
feedback+
|
Details | Diff | Splinter Review |
I see this on B2G. After coming back from offline, Gecko creates two TCP connections for first XHR request. After digging the source code, I found XHR.Open() would create a speculative connection, but the connection was closed immediately for |nsSocketTransportService::mGoingOffline == true|. So, later, XHR.Send() will cause another connection being created. But, |nsSocketTransportService::mGoingOffline| should be |false| since the device is online again.
|nsSocketTransportService::SetOffline(true)| would make |mGoingOffline == true|, but |nsSocketTransportService::SetOffline(true)| does not reset |mGoingOffline|, so |mGoingOffline == true| is possible kept for first speculative connection.
Assignee | ||
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Comment on attachment 666459 [details] [diff] [review]
Reset mGoingOffline to fix speculative connect
Review of attachment 666459 [details] [diff] [review]:
-----------------------------------------------------------------
Patrick, this little patch seems logical to me but I'm guessing you or Honza know this code better than I do.
Attachment #666459 -
Flags: review?(jduell.mcbugs) → review?(mcmanus)
Comment 3•12 years ago
|
||
Comment on attachment 666459 [details] [diff] [review]
Reset mGoingOffline to fix speculative connect
Review of attachment 666459 [details] [diff] [review]:
-----------------------------------------------------------------
adam?
Attachment #666459 -
Flags: feedback?(unusualtears)
Comment on attachment 666459 [details] [diff] [review]
Reset mGoingOffline to fix speculative connect
Nice fix! The socket thread will reset |mGoingOffline| after it clears its event queue. If we go back online before that happens, |mGoingOffline| should definitely reset.
Attachment #666459 -
Flags: feedback?(unusualtears) → feedback+
Updated•12 years ago
|
Attachment #666459 -
Flags: review?(mcmanus) → review+
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•