mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Treat duplicate matching challenge keys in valve proto as non-fatal resolves #58
This commit is contained in:
parent
148b295dc8
commit
5fd8318efb
1 changed files with 12 additions and 7 deletions
|
|
@ -217,15 +217,20 @@ class Valve extends require('./core') {
|
||||||
const type = reader.uint(1);
|
const type = reader.uint(1);
|
||||||
|
|
||||||
if(type === 0x41) {
|
if(type === 0x41) {
|
||||||
if(this.debug) console.log('Received challenge key');
|
const key = reader.uint(4);
|
||||||
if(this._challenge) return this.fatal('Received more than one challenge key');
|
|
||||||
this._challenge = reader.uint(4);
|
|
||||||
|
|
||||||
if(sendChallenge) {
|
if(this.debug) console.log('Received challenge key: ' + key);
|
||||||
if(this.debug) console.log('Restarting query');
|
|
||||||
send();
|
if(this._challenge !== key) {
|
||||||
return true;
|
this._challenge = key;
|
||||||
|
if(sendChallenge) {
|
||||||
|
if (this.debug) console.log('Restarting query');
|
||||||
|
send();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.debug) console.log("Received "+type.toString(16)+" expected "+expect.toString(16));
|
if(this.debug) console.log("Received "+type.toString(16)+" expected "+expect.toString(16));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue