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 Linux Specific Softlock on empty datagrams #534

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

ced777ric
Copy link
Contributor

Due to a difference in behaviour in DotNet on linux the Socket::Available property behaves differently.

On linux it will return 0 when an empty datagram is received, which results in the receivethread softlocking.
To resolve this we can use the selectReadList alongside Socket::Available.

Additionally, on linux the native socket will return a size 0 for empty packets aswel.
So we shouldn't kill the receive loop when the size is 0, as that would mean an empty packet can kill the receive thread.

@RevenantX RevenantX merged commit 57356a9 into RevenantX:master Nov 15, 2023
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