added triggers for 'close' and 'error'

This commit is contained in:
mario solorzano 2015-11-30 17:43:43 -08:00
parent 87daf40475
commit 4d332523dc

View file

@ -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;