blobbyvolley2
blobbyvolley2 copied to clipboard
Deadlock in ThreadSafeRakServer
When we shutdown the ThreadSafeRakServer (Disconnect method) we wait for the other thread (by observing isMainLoopThreadActive) to finish. Because of the lock it is possible that the thread never stops (Receive call in DedicatedServer class is blocked because Disconnect call holds lock and is checking isMainLoopThreadActive in an infinite loop which never become false. The result is a deadlock.
This behavior can be observed be restarting the lan server multiple times in blobby client.