added triggers for 'close' and 'error'
This commit is contained in:
parent
87daf40475
commit
4d332523dc
1 changed files with 4 additions and 1 deletions
|
@ -101,6 +101,8 @@ function connect(){
|
|||
'error',
|
||||
function(err){
|
||||
client.log('\n\n######\nerror: '.error, err);
|
||||
client.trigger('error', err);
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -109,7 +111,7 @@ function connect(){
|
|||
function(){
|
||||
client.trigger('connect');
|
||||
client.retriesRemaining=client.config.maxRetries;
|
||||
client.log('retrying reset')
|
||||
client.log('retrying reset');
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -129,6 +131,7 @@ function connect(){
|
|||
);
|
||||
|
||||
client.socket.destroy();
|
||||
client.trigger('close');
|
||||
client=undefined;
|
||||
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue