mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
Handle a Firefox error relating to websockets.
We've only gotten one error report for this error, and it didn't have a stack trace, so it's hard to know whether this will actually fix the issue or not. (imported from commit 7bff052347a33f67d8479b1cb23f6e5e24defc75)
This commit is contained in:
@@ -62,6 +62,12 @@ Socket.prototype = {
|
|||||||
// The connection was somehow closed. Our on-close handler will
|
// The connection was somehow closed. Our on-close handler will
|
||||||
// be called imminently and we'll retry this request upon reconnect.
|
// be called imminently and we'll retry this request upon reconnect.
|
||||||
return;
|
return;
|
||||||
|
} else if (e instanceof Error && e.message.indexOf("NS_ERROR_NOT_CONNECTED") !== -1) {
|
||||||
|
// This is a rarely-occurring Firefox error. I'm not sure
|
||||||
|
// whether our on-close handler will be called, so let's just
|
||||||
|
// call close() explicitly.
|
||||||
|
this._sockjs.close();
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user