Skip to content
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

Fix deadlock when "packet ready" buffer is full #565

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

kralverde
Copy link
Contributor

Description

When the send packet function is invoked on the client, the lock on the encrypter was unnecessarily held for the remainder of the function. When a notification was sent to the server_packets_channel, the encrypter lock was still held, preventing the serialized packet from being taken and blocking the next call to the send packet function

Testing

You can verify this worked by teleporting to the world border.
Before: Deadlock
Now: Normally chunk loading

Please follow our Coding Guidelines

@Snowiiii
Copy link
Collaborator

Nice. Thank you @kralverde 🚀

@Snowiiii Snowiiii merged commit 3f1fd5a into Pumpkin-MC:master Feb 19, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants