Repository navigation
fix(control): serialize OSCQuery boot and prevent socket accumulation - #738
Merged
Merged
Conversation
When OSC server sync is triggered repeatedly or in rapid succession, OSCQuery and mDNS sockets could be left listening concurrently on multiple candidate ports. Serialize OSCQuery start and stop through a promise queue with epoch invalidation, close lingering HTTP connections via closeAllConnections, ensure probe requests do not reuse closing keep-alive sockets, and track all mDNS sockets so none remain open across restarts. Co-authored-by: caganturgut <271973834+caganturgut@users.noreply.github.com>
|
CaYaDraft — pull request Summary Files
Note Stopping here. I will not merge, push, or change this pull request until you ask.
|
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.
Summary
Fixes socket and port accumulation when OSC server synchronization is triggered in rapid succession.
Query.start()andQuery.stop()inosc-query.jsthrough a Promise tail and generation counter (epoch).halt(). Latebindcallbacks from superseded epochs close their socket immediately instead of lingering.closeHttp()now invokeshttpServer.closeAllConnections()to terminate active/idle keep-alive connections cleanly.localhostIsOurs()usesagent: falseto avoid reusing connections destined for a shutting-down server.syncOscServerinmain.jsdiscards stale promises whengen !== oscInGen.tests/osc-in.test.jsensuring concurrent starts leave only 1 socket and cleanly release previous ports. All 2981 unit tests pass.Co-authored-by: caganturgut 271973834+caganturgut@users.noreply.github.com