Webapp: make SocketIO reconnect faster

The exponential backoff was getting a bit too long, making the webapp
sometimes very slow to reconnect. This is now limited to max 3 seconds.
This commit is contained in:
Sybren A. Stüvel 2024-03-02 22:20:42 +01:00
parent c0c70758c6
commit 63e3c8de37

@ -92,6 +92,9 @@ export default {
// console.log("connecting JobsListener to WS", websocketURL);
const ws = io(websocketURL, {
transports: ['websocket'],
reconnectionDelay: 250, // milliseconds
reconnectionDelayMax: 3000, // milliseconds
timeout: 1000, // milliseconds
});
this.socket = ws;