added 'explicitlyDisconnected' flag to Client object
this flag will be set to true when a 'ipc.disconnect' is called on the client to prevent the client from attempting to retry to connect
This commit is contained in:
parent
df0c6407c1
commit
90260d1d3d
1 changed files with 5 additions and 2 deletions
|
@ -16,7 +16,8 @@ function init(config,log){
|
||||||
connect : connect,
|
connect : connect,
|
||||||
emit : emit,
|
emit : emit,
|
||||||
log : log,
|
log : log,
|
||||||
retriesRemaining:config.maxRetries||0
|
retriesRemaining:config.maxRetries||0,
|
||||||
|
explicitlyDisconnected: false
|
||||||
};
|
};
|
||||||
|
|
||||||
new Pubsub(client);
|
new Pubsub(client);
|
||||||
|
@ -143,7 +144,9 @@ function connect(){
|
||||||
);
|
);
|
||||||
|
|
||||||
if(
|
if(
|
||||||
client.config.stopRetrying || client.retriesRemaining<1
|
client.config.stopRetrying ||
|
||||||
|
client.retriesRemaining<1 ||
|
||||||
|
client.explicitlyDisconnected
|
||||||
|
|
||||||
){
|
){
|
||||||
client.trigger('disconnect');
|
client.trigger('disconnect');
|
||||||
|
|
Loading…
Reference in a new issue