Closed Bug 1032670 Opened 10 years ago Closed 10 years ago

FxOS UDP sockets closed on WiFi status change

Categories

(Core :: Networking, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jryans, Unassigned)

References

Details

On Firefox OS devices, if I open a UDP socket:

let UDPSocket = CC("@mozilla.org/network/udp-socket;1",
                   "nsIUDPSocket",
                   "init");
let socket = new UDPSocket(-1, false);
socket.asyncListen({
  onStopListening: function(socket, status) {
    console.log(status);
  }
});

and then I toggle the WiFi connectivity state (change from WiFi enabled to disabled), then the socket is closed with the status NS_ERROR_ABORT.  To regain communication after WiFi is enabled again, currently you have to recreate a new socket.

On desktop platforms (or at least on OS X), the socket remains working and can be reused after you toggle the OS's WiFi connectivity.
Also, FxOS TCP sockets *do* remain listening between WiFi state changes, so this is somehow specific to UDP.
Sorry, looks like this is as intended.  I was comparing to the debugger's TCP socket, which has set KeepWhenOffline.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.