@controleonline/ui-common 1.2.127 → 1.2.128

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.
@@ -1,14 +1,13 @@
1
1
  {
2
- "version": "1.2.127",
2
+ "version": "1.2.128",
3
3
  "rc": 1,
4
- "branch": "rc/1.2.127-rc.1",
5
- "baseMaster": "15fe9362ec2cdc6f98c1eefc6241ff1ed682aa28",
4
+ "branch": "rc/1.2.128-rc.1",
5
+ "baseMaster": "6124d3024530bbb8ebdbccb86ccd7d4f36fd4229",
6
6
  "tasks": [
7
- 142,
8
7
  145
9
8
  ],
10
9
  "frozen": true,
11
10
  "repositories": {
12
- "ControleOnline/ui-common": "3751b577d7b45b8311948c9e67adf207c2e8cbf5"
11
+ "ControleOnline/ui-common": "5e974061a670257449936d0adae58d07791db502"
13
12
  }
14
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@controleonline/ui-common",
3
- "version": "1.2.127",
3
+ "version": "1.2.128",
4
4
  "author": "ControleOnline",
5
5
  "description": "ControleOnline Common Quasar UI Component",
6
6
  "license": "MIT",
@@ -34,6 +34,7 @@ export const createWebsocketSharedRuntime = ({
34
34
  leaderStaleMs = 6000,
35
35
  reconnectBaseMs = 1500,
36
36
  reconnectMaxMs = 12000,
37
+ connectTimeoutMs = 10000,
37
38
  channelName = DEFAULT_CHANNEL_NAME,
38
39
  } = {}) => {
39
40
  const startedAt = now();
@@ -491,6 +492,20 @@ export const createWebsocketSharedRuntime = ({
491
492
  const nextSocket = new WebSocketImpl(socketUrl);
492
493
  socket = nextSocket;
493
494
 
495
+ // A socket can stay CONNECTING forever (seen in Chrome after the server closed the previous one):
496
+ // the leader then never reconnects and the screens only update with F5. Give up and retry.
497
+ setTimeoutImpl(() => {
498
+ if (
499
+ !destroyed &&
500
+ !manualClose &&
501
+ isCurrentSocket(nextSocket, generation) &&
502
+ nextSocket.readyState === WebSocketImpl.CONNECTING
503
+ ) {
504
+ stopSocket();
505
+ scheduleReconnect();
506
+ }
507
+ }, connectTimeoutMs);
508
+
494
509
  nextSocket.onopen = () => {
495
510
  if (!isCurrentSocket(nextSocket, generation)) {
496
511
  return;