Repository navigation
fix(network): join workers before shutting down sockets - #5
Merged
Merged
Conversation
Co-Authored-By: Codex <codex@openai.com>
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4.
The engine forcibly terminates its network worker during shutdown, which can abandon Steam locks. All 11 supported Windows binaries also close sockets before stopping the worker, while its
selectruns outside the network lock.Track the exact
NET_ThreadFuncworker and request cooperative exit atNET_Shutdownentry. Wait for the real thread object before forwarding to the original queue/socket cleanup. The worker exits at its unlockedSleep(1)loop tail; a 20 ms select cap and a stop-awareNET_QueuePackethook prevent idle waits or continuous reception from starving that boundary. Keep the targetedTerminateThreadinterception for other stop paths, preserve unrelated threads and original cleanup, and support repeated shutdown/recreation. The change also corrects manager-owned handle reclamation and waits outside the manager list lock.Validation:
Release dependencies:
NET_QueuePacketsymbols from feat(symbols): add NET_QueuePacket for all Windows engines HLND2T/GoldSrc_VibeSignatures#340.NET_Shutdownis already available; the consumer manifest now requires it.LoadBlob.cppordinal-import fix so namedselectqueries find ordinal imports. That core change is currently local and is not included in this PR; BLOB live verification used the patched launcher. Do not release BLOB support without it.