mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
Remove callback support and global Gamedig.debug option
This commit is contained in:
parent
fdc08b5c09
commit
dfa5c95efc
5 changed files with 28 additions and 46 deletions
|
|
@ -1,5 +1,6 @@
|
|||
const GameResolver = require('./GameResolver'),
|
||||
ProtocolResolver = require('./ProtocolResolver');
|
||||
ProtocolResolver = require('./ProtocolResolver'),
|
||||
GlobalUdpSocket = require('./GlobalUdpSocket');
|
||||
|
||||
const defaultOptions = {
|
||||
socketTimeout: 2000,
|
||||
|
|
@ -8,9 +9,8 @@ const defaultOptions = {
|
|||
};
|
||||
|
||||
class QueryRunner {
|
||||
constructor(udpSocket, debug) {
|
||||
this.debug = debug;
|
||||
this.udpSocket = udpSocket;
|
||||
constructor() {
|
||||
this.udpSocket = new GlobalUdpSocket();
|
||||
this.gameResolver = new GameResolver();
|
||||
this.protocolResolver = new ProtocolResolver();
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ class QueryRunner {
|
|||
}
|
||||
|
||||
async _attempt(options) {
|
||||
if (this.debug) {
|
||||
if (options.debug) {
|
||||
console.log("Running attempt with options:");
|
||||
console.log(options);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue