This commit is contained in:
syuilo 2019-05-07 18:48:38 +09:00
parent 70123805e1
commit 51f98020f6
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ export default class Stream extends EventEmitter {
const user = os.store.state.i; const user = os.store.state.i;
this.stream = new ReconnectingWebsocket(wsUrl + (user ? `?i=${user.token}` : '')); this.stream = new ReconnectingWebsocket(wsUrl + (user ? `?i=${user.token}` : ''), '', { minReconnectionDelay: 1 }); // https://github.com/pladaria/reconnecting-websocket/issues/91
this.stream.addEventListener('open', this.onOpen); this.stream.addEventListener('open', this.onOpen);
this.stream.addEventListener('close', this.onClose); this.stream.addEventListener('close', this.onClose);
this.stream.addEventListener('message', this.onMessage); this.stream.addEventListener('message', this.onMessage);