Keep discovery alive when WiFi network changes

RESOLVED FIXED in Firefox 33

Status

()

Firefox
Developer Tools: WebIDE
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jryans, Assigned: jryans)

Tracking

unspecified
Firefox 33
All
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

The discovery socket is dropped on b2g devices if the WiFi network changes, goes to sleep, etc.
Created attachment 8449023 [details] [diff] [review]
Restart discovery when network changes

We listen for a message on b2g whenever the network changes, and restart any sockets that were open previously.

Try: https://tbpl.mozilla.org/?tree=Try&rev=e5e667d3cec1
Attachment #8449023 - Flags: review?(paul)

Comment 2

4 years ago
Comment on attachment 8449023 [details] [diff] [review]
Restart discovery when network changes

+  this.observe = this.observe.bind(this);

I'm not sure this is necessary.
Attachment #8449023 - Flags: review?(paul) → review+
Created attachment 8449674 [details] [diff] [review]
Restart discovery when network changes (v2, paul: r+)

(In reply to Paul Rouget [:paul] (slow to respond. Ping me on IRC) from comment #2)
> Comment on attachment 8449023 [details] [diff] [review]
> Restart discovery when network changes
> 
> +  this.observe = this.observe.bind(this);
> 
> I'm not sure this is necessary.

You're right, it's not.  Removed!

Also, I changed this slightly to only restart if the active network is WiFi.

Try: https://tbpl.mozilla.org/?tree=Try&rev=4861df991499
Attachment #8449023 - Attachment is obsolete: true
Attachment #8449674 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/167888bcb787
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/167888bcb787
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
You need to log in before you can comment on or make changes to this bug.