chore: faster reconnect for dev
This commit is contained in:
parent
8745ac5f45
commit
0afc22b834
|
@ -30,7 +30,14 @@ export default class SocketClient extends decorate(Socket) {
|
||||||
}
|
}
|
||||||
this.address = address;
|
this.address = address;
|
||||||
debug('connecting to %s', this.address);
|
debug('connecting to %s', this.address);
|
||||||
this.socket = io(this.address, this.latus.invokeReduce('@latus/socket/client'));
|
this.socket = io(
|
||||||
|
this.address,
|
||||||
|
{
|
||||||
|
reconnectionDelay: 'production' === process.env.NODE_ENV ? 1000 : 100,
|
||||||
|
reconnectionDelayMax: 'production' === process.env.NODE_ENV ? 5000 : 500,
|
||||||
|
...this.latus.invokeReduce('@latus/socket/client'),
|
||||||
|
},
|
||||||
|
);
|
||||||
this.socket.emitPromise = promisify(this.socket.emit.bind(this.socket));
|
this.socket.emitPromise = promisify(this.socket.emit.bind(this.socket));
|
||||||
[
|
[
|
||||||
'error',
|
'error',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user