-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket not closable before program end. #337
Comments
The socket for our custom connection classes should be automatically getting closed on that instance getting garbage collected using There is no way to close it for you, since after you ran the status, because the connection is created within the status function, and gets out of scope once the function ends. However it should be an easy fix to just make a For the library, this should be an easy fix, as we can just explicitly close the connection once we obtained the status (or query, etc.) by directly calling |
We could also add enter and exit functions to enable |
Just found an error silently reported by pytest in one of our workflows regarding to this: This error didn't cause the workflow to fail, as exceptions raised from I think this Also, this issue should probably be somehow marked as having somewhat higher priority, as without this getting fixed, using mcstatus in places that require opening up many connections may end up causing this very unintuitive error message of "too many open files". |
When doing something like
There does not appear to be a way to close the socket connection (normally done on program end). Because of this, large amounts of calls to get server data from a queue will run into the error "Too many open files", the files being the sockets. The only way I can currently see to close the socket is to end the program. If there is another way to do this, please correct me.
The text was updated successfully, but these errors were encountered: