Closed Bug 795816 Opened 12 years ago Closed 9 years ago

Create additional TCP connections after going back from offline

Categories

(Core :: Networking, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: sinker, Assigned: sinker)

References

Details

Attachments

(1 file)

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: nobody → tlee
Status: NEW → ASSIGNED
Attachment #666459 - Flags: review?(jduell.mcbugs)
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)
Depends on: 87717
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+
Attachment #666459 - Flags: review?(mcmanus) → review+
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.

Attachment

General

Created:
Updated:
Size: