Example error :
connections[this.hash].gone=setTimeout(function(x){connections[x].end(); delete connections[x]; },BOUNCER_TIMEOUT*1000,this.hash);
^
TypeError: Cannot read property 'end' of undefined
connections[this.hash].connected=false;
connections[this.hash].write("AWAY :jbnc\n");
if(BOUNCER_TIMEOUT!=0 && BOUNCER_TIMEOUT!=null) {
- connections[this.hash].gone=setTimeout(function(x){connections[x].end();delete connections[x];},BOUNCER_TIMEOUT*1000,this.hash);
+ connections[this.hash].gone=setTimeout(function(x){try{connections[x].end();}catch(e){} try{delete connections[x];}catch(e){} },BOUNCER_TIMEOUT*1000,this.hash);
}
}
}