-
Notifications
You must be signed in to change notification settings - Fork 183
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
DisconnectPacket not getting called on kick #232
Comments
Could you post the actual error to make it easier to debug the issue? |
The errors are raised by the socket module really, heres one:
|
Could you explain what you were trying to do or did you use the default start.py? |
Happens with me using start.py and me using my own code (not doing anything special really just reading chat and sending commands), but whenever any error gets raised like an |
Can you post a repo for your code because other than the default start.py code, I don't know what you did with the chat code. |
Also, have you tried running the code in debug mode? |
How do I enable it?
Nothing much, just ASCII and characters I know are allowed. I don't see why this is useful though, My problem is that DisconnectPacket doesn't get called on those types of errors, not with the errors themselves |
python start.py -d
I usually like to cover my bases in a debugging issue. Even if you believe that it doesn't make a difference. It sounds like a raised condition with your early error message: "ConnectionResetError: [Errno 104] Connection reset by peer" is normally a polite way of a server slamming the phone down upon picking it up. The only time encryption.py is used in networks is for logins. Are you trying to connect to 1.17 server because the current pycraft isn't updated to handle it. Also, are you on a Mojang or Microsoft account? Because, the current pycraft doesn't support Microsoft and my repo doesn't have Microsoft AUTH changes pushed on it just yet. About the disconnect packet, the reason why I asked to see your code is because in the original pycraft; there is no registered packet listener that handles the disconnect packet. Here is some code that might help with your issue:
|
Thank you, also what im doing right now is
|
Sometimes, the server may just drop the connection without attempting to send a Disconnect packet, or the connection may be closed before the Disconnect packet reaches the client. Unless you have reason to believe that the client is actually receiving a Disconnect packet and isn't triggering its handlers, I think this is working as intended. If you want to catch every instance of the connection being terminated, use the |
/networking.packets.clientbound.play.DisconnectPacket sometimes doesnt get called when the server kicks you and instead only raises a python error, is this intentional?
The text was updated successfully, but these errors were encountered: