mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-15 03:14:56 -05:00
Display more information in proxy.js
This commit is contained in:
parent
57f5b9d23d
commit
a3c65de9a4
1 changed files with 5 additions and 2 deletions
|
@ -159,6 +159,8 @@ srv.on('login', function(client) {
|
|||
console.log("client->server: Error in packetId " + state + ".0x" + packetId.value.toString(16));
|
||||
console.log(buffer.toString('hex'));
|
||||
console.log(packetBuff.toString('hex'));
|
||||
console.log(buffer.length);
|
||||
console.log(packetBuff.length);
|
||||
}
|
||||
});
|
||||
targetClient.on('end', function() {
|
||||
|
@ -167,9 +169,10 @@ srv.on('login', function(client) {
|
|||
if(!endedClient)
|
||||
client.end("End");
|
||||
});
|
||||
targetClient.on('error', function() {
|
||||
targetClient.on('error', function(err) {
|
||||
endedTargetClient = true;
|
||||
console.log('Connection error by server', '(' + addr + ')');
|
||||
console.log('Connection error by server', '(' + addr + ') ',err);
|
||||
console.log(err.stack);
|
||||
if(!endedClient)
|
||||
client.end("Error");
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue