Skip to content

Commit b81b8e8

Browse files
authored
Merge pull request #38 from Madriix/master
Update bouncer.js
2 parents 8d10cd2 + d46125d commit b81b8e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bouncer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ process.on('SIGHUP',function() {
5151
BOUNCER_ADMIN=config.bouncerAdmin?config.bouncerAdmin:'';
5252
});
5353

54-
// Prevent BNC from crashing for all other users when an error is caused by a user (with log error)
54+
// Prevent BNC from crashing for all other users when an error is caused by a user (with log error and time)
5555
process.on('uncaughtException', (err, origin) => {
56-
console.error(`# Serious problem (${origin}) - this should not happen but the JBNC is still running. ${err.stack}`);
56+
console.error(`${parseInt(Number(new Date()) / 1000)} # Serious problem (${origin}) - this should not happen but the JBNC is still running. ${err.stack}`);
5757
});
5858

5959

@@ -308,7 +308,7 @@ server = doServer(tlsOptions,function(socket) {
308308
if(this.lastping == command[1]) {
309309
this.lastping='';
310310
}
311-
else {
311+
else if(this.hash && connections[this.hash]) {
312312
connections[this.hash].write("PONG "+command[1]+"\n");
313313
}
314314
}

0 commit comments

Comments
 (0)