signal-desktop/js
lilia fd6e2954f7 Curtail over-zealous websocket reconnects
Closes #173

Previously, in the event of a failed websocket auth, we would attempt to
reconnect once a second ad infinitum. This changeset ensures that we
only reconnect automatically if the socket closed 'normally' as
indicated by the code on the socket's CloseEvent. Otherwise, show a
'Websocket closed' error on the inbox view.

Ideally we would show a more contextual error (ie, 'Unauthorized'), but
unfortunately the actual server response code is not available to our
code. It can be observed in the console output from the background page,
but programmatically, we only receive the WebSocket CloseEvent codes
listed here:
https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes

The websocket error message is displayed by a normally-hidden but ever
present socket status element. Clicking this element will immediately
refresh the background page, which will try again to open the websocket
connection.
2015-03-09 16:04:26 -07:00
..
models Use consistent boiler plate throughout js files 2015-03-05 15:45:35 -08:00
views Curtail over-zealous websocket reconnects 2015-03-09 16:04:26 -07:00
background.js Curtail over-zealous websocket reconnects 2015-03-09 16:04:26 -07:00
bimap.js Simplify panel state management and message passing 2015-02-11 17:37:56 -08:00
chromium.js Curtail over-zealous websocket reconnects 2015-03-09 16:04:26 -07:00
components.js Add canvas.toBlob polyfill 2015-03-03 18:44:18 -08:00
conversation_panel.js Remove uneeded render 2015-02-12 13:21:18 -08:00
database.js Add index on conversation type 2015-02-11 17:38:01 -08:00
inbox_controller.js Fix inbox comparator 2015-02-18 00:11:35 -08:00
index.js Setup loading gif on conversation list 2015-02-11 17:37:59 -08:00
libphonenumber-util.js jshint all the things 2015-02-19 00:22:23 -08:00
libtextsecure.js Curtail over-zealous websocket reconnects 2015-03-09 16:04:26 -07:00
options.js Restyle registration page 2015-03-06 15:27:49 -08:00
panel_controller.js Adjust widths of bubbles and chat window 2015-03-04 15:59:28 -08:00
register.js Restyle registration page 2015-03-06 15:27:49 -08:00