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.
Files changed (2) hide show
  1. package/client/worker.js +12 -2
  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
- // do not reconnect when we call `socket.disconnect()`
101
- if (reconnect && code !== 1005) {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angelia.io",
3
- "version": "4.0.89",
3
+ "version": "4.0.90",
4
4
  "description": "WebSockets Server and Client API for node.js and the browser, with rooms support.",
5
5
  "author": "@titoBouzout @boredofnames",
6
6
  "license": "GPL",