Skip to content

Commit 4fbab67

Browse files
authored
Merge pull request #21 from Madriix/master
Update of gone with error .end();
2 parents 393857a + ffc3c8c commit 4fbab67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bouncer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ server = doServer(tlsOptions,function(socket) {
298298
case 'NICK':
299299
if(this.hash && connections[this.hash] && command[1]) {
300300
connections[this.hash].write("NICK "+command[1]+"\n");
301-
connections[this.hash].nick=command[1];
301+
//connections[this.hash].nick=command[1];
302302
}
303303
break;
304304
case 'JBNC':
@@ -561,7 +561,7 @@ server = doServer(tlsOptions,function(socket) {
561561
connections[this.hash].connected=false;
562562
connections[this.hash].write("AWAY :jbnc\n");
563563
if(BOUNCER_TIMEOUT!=0 && BOUNCER_TIMEOUT!=null) {
564-
connections[this.hash].gone=setTimeout(function(x){connections[x].end();delete connections[x];},BOUNCER_TIMEOUT*1000,this.hash);
564+
connections[this.hash].gone=setTimeout(function(x){try{connections[x].end();}catch(e){} try{delete connections[x];}catch(e){} },BOUNCER_TIMEOUT*1000,this.hash);
565565
}
566566
}
567567
}

0 commit comments

Comments
 (0)