Giter VIP home page Giter VIP logo

node-minecraft-pinger's People

Contributors

dennisbruner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-minecraft-pinger's Issues

Cannot read property 'name' of undefined

Hi,

Im not 100% sure what is causing this but I am running into the following error:

TypeError: Cannot read property 'name' of undefined
    at QueryReqWrap.callback (/Users/REDACTED/Desktop/test-project/node_modules/minecraft-pinger/lib/index.js:107:31)
    at QueryReqWrap.onresolve [as oncomplete] (dns.js:205:10)
[ERROR] 12:47:52 TypeError: Cannot read property 'name' of undefined

I will post more info when I've worked out why this is being caused (seems to be related to line 107 in index.js).

EDIT: I've just seen that the open PR against this will fix it, however assume this is no longer maintained because its not been accepted.

Thanks,

Ability to change the Packet timeout

Hi there,

Currently the Packet timeout is hard coded to 10 seconds. 10 seconds is quite a long time to wait, and is even more considerable when running this against thousands of servers (on a server list website for example), eg 1% of servers being offline for 10,000 server pings is a total of 16 minutes delay.

This is quite considerable for my use case because I am storing the player counts every hour in a database. I loop over all servers every hour, and the result is that server number 9,997 is seeing a 15 minute delay on its hourly player count - server 1 has a 3pm player count where as server 9997 has a 3:15pm player count.

Would it be possible to add in a variable for this so that the Packet timeout can be lowered?

Unexpected end of JSON input

Hi @dennisbruner ,

I have been testing since the last bump (thanks for doing that) and have noticed the following issue while testing:

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at .../node_modules/minecraft-pinger/lib/packet.js:136:26
    at new Promise (<anonymous>)
    at decodeHandshakeResponse (.../node_modules/minecraft-pinger/lib/packet.js:127:10)
    at .../node_modules/minecraft-pinger/lib/packet.js:73:18
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

I am unsure why this is happening, but is specifically with the server ip HexicPrison.net port 25565. I have also pinged this server with mcsrvstat and cant see anything unusual: https://api.mcsrvstat.us/2/HexicPrison.net.

Thanks

UnhandledPromiseRejectionWarning

When ever you ping a server, you get multiple UnhandledPromiseRejectionWarning occurring, before the data retrieved.

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: cb is not a function

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.