mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-18 09:40:38 +01:00
Fix TCP timeouts and debugging *again*
This commit is contained in:
parent
321580e3bb
commit
422a316853
1 changed files with 2 additions and 2 deletions
|
@ -230,7 +230,7 @@ module.exports = Class.extend(EventEmitter,{
|
|||
if(self.debug) console.log(address+':'+port+" <--TCP "+data.toString('hex'));
|
||||
received = Buffer.concat([received,data]);
|
||||
if(self.tcpCallback(received)) {
|
||||
clearTimeout(this.tcpTimeoutTimer);
|
||||
clearTimeout(self.tcpTimeoutTimer);
|
||||
self.tcpCallback = false;
|
||||
received = new Buffer(0);
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ module.exports = Class.extend(EventEmitter,{
|
|||
if(self.tcpCallback) return self.fatal('Attempted to send TCP packet while still waiting on a managed response');
|
||||
self._tcpConnect(function(socket) {
|
||||
socket.write(buffer);
|
||||
if(this.debug) console.log(socket.remoteAddress+':'+socket.remotePort+" TCP--> "+buffer.toString('hex'));
|
||||
if(self.debug) console.log(socket.remoteAddress+':'+socket.remotePort+" TCP--> "+buffer.toString('hex'));
|
||||
});
|
||||
if(!ondata) return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue