gamedig / node-gamedig

Query game servers and not only! Node.JS/Deno/Bun or Bash (via the CLI).
https://www.npmjs.com/package/gamedig
MIT License
600 stars 147 forks source link

ECONNREFUSED MYSERVERIP:GAMEPORT at TCPConnectWrap.afterConnect #104

Closed jimnordb closed 5 years ago

jimnordb commented 5 years ago

Having this issue and it breaks my app. i tried catching with try { gamedig code here } but still breaks app

Error: connect ECONNREFUSED MYSERVERIP:GAMEPORT
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)

happens at the handshake if my server is still starting and is not accepting rcon requests just yet.

Gamedig.query({ type: 'minecraft', host: 'MYSERVERIP', port: GAMEPORT})

this might be minecraft specific but should be solved incase other games do the same.

mmorrisontx commented 5 years ago

Are you on the latest version of gamedig? I believe this should have been fixed in 2.0.7.

jimnordb commented 5 years ago

That fixed it! :) i just started using gamedig like a few days ago with a fresh project. didnt notice the updates!

thanks for this module btw! :)