display error in proxy

This commit is contained in:
Romain Beaumont 2016-02-15 20:50:42 +01:00
parent 88c20cf795
commit 86397e7d06

View file

@ -85,9 +85,10 @@ srv.on('login', function(client) {
if(!endedTargetClient)
targetClient.end("End");
});
client.on('error', function() {
client.on('error', function(err) {
endedClient = true;
console.log('Connection error by client', '(' + addr + ')');
console.log(err.stack);
if(!endedTargetClient)
targetClient.end("Error");
});