angelia.io 4.0.89 → 4.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/worker.js +12 -2
- package/package.json +1 -1
package/client/worker.js
CHANGED
|
@@ -70,6 +70,12 @@ export function ClientWebWorker() {
|
|
|
70
70
|
* event.reason)
|
|
71
71
|
*/
|
|
72
72
|
break
|
|
73
|
+
case 1001:
|
|
74
|
+
/**
|
|
75
|
+
* Freaking firefox code when reloading the page, must be
|
|
76
|
+
* blacklisted else it will connect twice in reloads.
|
|
77
|
+
*/
|
|
78
|
+
break
|
|
73
79
|
case 1005:
|
|
74
80
|
/**
|
|
75
81
|
* Closed by client - console.log( 'ws - we called
|
|
@@ -97,8 +103,12 @@ export function ClientWebWorker() {
|
|
|
97
103
|
postMessage(['dispatch', 'disconnect'])
|
|
98
104
|
}
|
|
99
105
|
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
console.log(code)
|
|
107
|
+
|
|
108
|
+
// 1001: freaking firefox
|
|
109
|
+
// 1005: do not reconnect when we call `socket.disconnect()`
|
|
110
|
+
// 1006: DO NOT USE! THAT HAPPENS WHEN SERVER CONNECTION IS KILLED
|
|
111
|
+
if (reconnect && code !== 1005 && code !== 1001) {
|
|
102
112
|
postMessage(['connect'])
|
|
103
113
|
}
|
|
104
114
|
}
|