Comments (7)
You may try going into mcstatus/protocol/connection.py l153 and mcstatus/protocol/connection.py l182 and replace
def __del__(self):
self.socket.close()
with
def __del__(self):
try:
self.socket.close()
except:
pass
and test if the application still halts.
This by no means prevents the error, it should just pass the exception allowing the application to continue running as if nothing happened.
from mcstatus.
Seems like the problem is that there's no socket to close when the connection failed or has been closed already...
For now try initializing a new Server each time you want to check the status and see if that works as wanted.
from mcstatus.
@Reviville Does inactivity mean you resolved your issue or you gave up on it?
from mcstatus.
@MarkL4YG i gave up on it as this error still occurs.
from mcstatus.
Just did.
Seems to "work" for now.
Thank you.
from mcstatus.
@Reviville FYI The exception indicates that something in the connection failed prior to setting the socket causing a common NullPointerException when the connection is being destroyed for garbage collection.
Using such a fix should therefore not be any problem since a nonexistent socket doesn't require to be closed obviously.
I would ask you not to resolve this issue since the issue still persists in the code and adaptions are necessary to cover such a case.
from mcstatus.
Fixed in #56
from mcstatus.
Related Issues (20)
- MCSTATUS raw HOT 2
- Can't ping server on Termux HOT 5
- How do I run mcstatus? HOT 1
- status.version does not have a sensible string representation HOT 3
- Drop support for python 3.6
- Decode ISO 8859-1 into UTF-8
- minecrafBedrockServer failing to connect to a server HOT 5
- TypeError: an integer is required (got type NoneType) HOT 2
- Community Chat? HOT 2
- Key existence for COLOR_MAP is not being checked HOT 3
- Complex Description Styles are lacking test coverage HOT 3
- How to get server name / motd ?
- Update click to 8.0.0 HOT 2
- Raising errors on invalid ip requires rewrite of client logic HOT 15
- Support multiple types of formatting for MOTD
- Synchronous operations inside async functions HOT 1
- To replace sync 'dns.resolver.resolve' with `dns.asyncresolver` HOT 1
- UDPAsyncSocketConnection cannot write anything special itself HOT 3
- Unable to use module in a python script HOT 5
- Getting timeout for status.plays.online HOT 2
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 mcstatus.