stohrendorf / CroftEngine

An open-source Tomb Raider 1 engine remake
Other
285 stars 18 forks source link

Stop worker threads before closing socket #305

Closed serishema closed 1 year ago

serishema commented 1 year ago

this prevents ASIO from deadlocking on GetQueuedCompletionStatus() (win32 api) after the socket is closed when join is called on the network thread.

I'm not 100% sure this is the correct solution, but it seems to work when I tested multiple reconnects.