Closed Bug 1158868 Opened 9 years ago Closed 9 years ago

PeerConnection should not depend on navigator.onLine

Categories

(Core :: WebRTC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: valentin, Assigned: valentin)

Details

Attachments

(1 file)

As part of bug 786419 I changed PeerConnection.js to check navigator.onLine in order to determine if connectivity is present. However, if we mean to have navigator.onLine illustrate network connectivity, this means while offline we could not open PeerConnections to localhost.
It is best to check instead if that specific appId is offline.
Comment on attachment 8598313 [details] [diff] [review]
PeerConnection should not depend on navigator.onLine

Review of attachment 8598313 [details] [diff] [review]:
-----------------------------------------------------------------

r+, though it's unclear to me what the implications are of (or more to the point, reasons for) the appid being offline would be; I'm just guessing.
Attachment #8598313 - Flags: review?(rjesup) → review+
(In reply to Randell Jesup [:jesup] from comment #2)
> r+, though it's unclear to me what the implications are of (or more to the
> point, reasons for) the appid being offline would be; I'm just guessing.

Although the API for Gaia hasn't landed yet (bug 1042745), disabling network connectivity for individual appIDs is supported. ioService.setOffline(appId, nsIAppOfflineInfo::OFFLINE) should close all connections for the given appId, and should not allow that app to create any new connections.
https://hg.mozilla.org/mozilla-central/rev/fcc036a85f19
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: