Giter Club home page Giter Club logo

Comments (7)

MarkL4YG avatar MarkL4YG commented on August 14, 2024 2

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.

MarkL4YG avatar MarkL4YG commented on August 14, 2024

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.

MarkL4YG avatar MarkL4YG commented on August 14, 2024

@Reviville Does inactivity mean you resolved your issue or you gave up on it?

from mcstatus.

Reviville avatar Reviville commented on August 14, 2024

@MarkL4YG i gave up on it as this error still occurs.

from mcstatus.

Reviville avatar Reviville commented on August 14, 2024

Just did.
Seems to "work" for now.
Thank you.

from mcstatus.

MarkL4YG avatar MarkL4YG commented on August 14, 2024

@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.

kevinkjt2000 avatar kevinkjt2000 commented on August 14, 2024

Fixed in #56

from mcstatus.

Related Issues (20)

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.