mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
Reduced chance of protocol collisions between gamespy3 and minecraftbedrock (2.0.27)
This commit is contained in:
parent
883700d7dd
commit
052736edd7
6 changed files with 41 additions and 21 deletions
|
|
@ -148,9 +148,15 @@ class Gamespy3 extends Core {
|
|||
return await this.udpSend(b,(buffer) => {
|
||||
const reader = this.reader(buffer);
|
||||
const iType = reader.uint(1);
|
||||
if(iType !== type) return;
|
||||
if(iType !== type) {
|
||||
this.logger.debug('Skipping packet, type mismatch');
|
||||
return;
|
||||
}
|
||||
const iSessionId = reader.uint(4);
|
||||
if(iSessionId !== this.sessionId) return;
|
||||
if(iSessionId !== this.sessionId) {
|
||||
this.logger.debug('Skipping packet, session id mismatch');
|
||||
return;
|
||||
}
|
||||
|
||||
if(!assemble) {
|
||||
return reader.rest();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue