fd6e2954f7
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. |
||
---|---|---|
.. | ||
attachment_preview_view.js | ||
attachment_view.js | ||
conversation_list_item_view.js | ||
conversation_list_view.js | ||
conversation_view.js | ||
end_session_view.js | ||
file_input_view.js | ||
group_update_view.js | ||
inbox_view.js | ||
key_verification_view.js | ||
list_view.js | ||
message_detail_view.js | ||
message_list_view.js | ||
message_view.js | ||
new_conversation_view.js | ||
new_group_update_view.js | ||
phone-input-view.js | ||
toast_view.js | ||
whisper_view.js |