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