Comments (6)
Thanks @ldilley! The fix works perfectly. Please give me aheads up if possible when it gets deployed to npm. Many thanks for the prompt fix!
from minestat.
Thank you for reaching out, @Conanap. I just tested against a Minecraft server running version 1.4.7 with the ternary operator using nodejs
v12.22.12. This test was also using the latest minestat.js
code from master. I am unable to replicate your findings. See the screenshots below for details. The first instance of "Online" is while the server is running. The "Offline" output that follows is after I terminate the Minecraft server.
Is the variable's value or the result possibly cached in your webserver application (or browser) somehow?
from minestat.
Hey, thanks for the quick reply! I've refreshed the broswer as well and clear cache, but couldn't seem to get it to show as offline. The site makes a request for the updated status to the server every 10 seconds, and in the networking tab I can see that the response is "online" as well
Perhaps the server version may be the issue? Is there support for 1.19.x? Thanks!
from minestat.
After some discussion and testing with @mindsolve, it turns out that this is a bug if the interpreter is run interactively/persistently. The interpreter retains the true
value until it exits (or the variable is explicitly reset). We have a small fix that I'll be pushing soon.
from minestat.
PR #131 has been submitted as a fix. Please let us know if that resolves your issue, @Conanap. If so, I'll ensure that the npm package gets updated as well.
from minestat.
You are most welcome, @Conanap. I am glad that the latest PR merge resolved your issue. Version 1.0.4 has also been published to the official npm repository.
from minestat.
Related Issues (20)
- Feature Request - Net Core Support HOT 3
- Minestat Java reports servers as always offline (MC 1.19.2 / Java 17) HOT 12
- Python bug preventing SLP querying
- KeyError: 'motd_2' , when "-" in the IP HOT 12
- Some servers cannot query the information HOT 10
- Add support for SRV record resolution
- Add GameSpy4/UT3 query protocol support
- JSON Protocol Is Removing Whitespace In MOTD HOT 2
- Is there a Gradle version for java? HOT 2
- A question about Java and bedrock server protocols HOT 9
- Python: Port from SRV record is not used HOT 1
- PHP @ Minestat erroe on socket_recv() line 293 HOT 9
- Powershell -> PHP HOT 3
- Player Username option HOT 7
- `description` don't always exist HOT 1
- Possible runtime error when MotD is empty/null HOT 1
- KeyError `players` HOT 4
- [Ruby] `srv_suceeded` seems typo
- Nested `extra` in MOTD is not parsed correctly on `stripped_motd` HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minestat.