Skip to content

Fix race condition on PacketsToBeHandled#1

Open
ferib wants to merge 1 commit intoBlumster:masterfrom
AnimeShooter:master
Open

Fix race condition on PacketsToBeHandled#1
ferib wants to merge 1 commit intoBlumster:masterfrom
AnimeShooter:master

Conversation

@ferib
Copy link

@ferib ferib commented Jan 8, 2025

I have Qpang private game server over at https://github.com/AnimeShooter/QServer

tbh I still lack the full understanding of OpenTNL but while testing my server -- which literally spams 50 packets/second per player in lobby -- I noticed random errors showing up after several minutes. After long nights of troubleshooting and attempts to debug the problem I concluded a race condition might be the culprit

The lock() on TNLSocket.PacketsToBeHandled for .Enqueue and .Dequeue seems to do wonders 🎉

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.

1 participant