Deadlock in ReliableSequencedChannel.HandleAck(ArraySegment<byte> payload)
THplusplus opened this issue · 0 comments
Describe the bug
Endless loop due to wrong data type in counter variable i
.
To Reproduce
I don't have enough understanding of the inner workings to tell how exactly to reproduce this. However it's obvious that the for loop in ReliableSequencedChannel.HandleAck(ArraySegment<byte> payload)
can never complete when bits
is greater than 255. Not sure IF bits
should ever be greater than 255, but it is in my case. The debugger shows a value of 4128 in my case.
Same issue may probably occur in ReliableChannel
as well.
Expected behavior
It shouldn't lock up. Either the counter i
should be of type int
or it should be guaranteed that bits
can never exceed 255.
Environment (please complete the following information):
- OS: Debian 11
- Unity Version: N/A (this is a pure .NET 7 application)
- Ruffles Version: 11.1.9
- Ruffles Commit: aab94e4
Additional context
The deadlock occurs after a few minutes during loadtests of my game server. It is possible that the game server is sending or receiving too much data which may increase the chance of this issue ocurring.