corrected close to destroy on destroy

This commit is contained in:
mario solorzano 2015-12-02 10:05:47 -08:00
parent 4d332523dc
commit 4045cc820a

View file

@ -124,6 +124,7 @@ function connect(){
client.config.stopRetrying || client.retriesRemaining<1
){
client.trigger('disconnect');
client.log(
client.config.id.variable,
'exceeded connection rety amount of'.warn,
@ -131,7 +132,7 @@ function connect(){
);
client.socket.destroy();
client.trigger('close');
client.trigger('destroy');
client=undefined;
return;