aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/xtext/XtextWebSocketClient.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-06 22:32:04 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-08 01:24:50 +0200
commit5f8f4e6484faff23821ca7c009e309382fba914d (patch)
tree6d399fb90b4aa3527c30c502ba474cd83b5c94b2 /subprojects/frontend/src/xtext/XtextWebSocketClient.ts
parentfeat(frontend): handle page hide events (diff)
downloadrefinery-5f8f4e6484faff23821ca7c009e309382fba914d.tar.gz
refinery-5f8f4e6484faff23821ca7c009e309382fba914d.tar.zst
refinery-5f8f4e6484faff23821ca7c009e309382fba914d.zip
feat(frontend): check for updates periodically
Diffstat (limited to 'subprojects/frontend/src/xtext/XtextWebSocketClient.ts')
-rw-r--r--subprojects/frontend/src/xtext/XtextWebSocketClient.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/subprojects/frontend/src/xtext/XtextWebSocketClient.ts b/subprojects/frontend/src/xtext/XtextWebSocketClient.ts
index cba6f064..a39620cb 100644
--- a/subprojects/frontend/src/xtext/XtextWebSocketClient.ts
+++ b/subprojects/frontend/src/xtext/XtextWebSocketClient.ts
@@ -1,4 +1,5 @@
1import { createAtom, makeAutoObservable, observable } from 'mobx'; 1import { createAtom, makeAutoObservable, observable } from 'mobx';
2import ms from 'ms';
2import { nanoid } from 'nanoid'; 3import { nanoid } from 'nanoid';
3import { interpret } from 'xstate'; 4import { interpret } from 'xstate';
4 5
@@ -18,7 +19,7 @@ const XTEXT_SUBPROTOCOL_V1 = 'tools.refinery.language.web.xtext.v1';
18 19
19// Use a large enough timeout so that a request can complete successfully 20// Use a large enough timeout so that a request can complete successfully
20// even if the browser has throttled the background tab. 21// even if the browser has throttled the background tab.
21const REQUEST_TIMEOUT = 5000; 22const REQUEST_TIMEOUT = ms('5s');
22 23
23const log = getLogger('xtext.XtextWebSocketClient'); 24const log = getLogger('xtext.XtextWebSocketClient');
24 25