Repository navigation
Close keep_alive_loop's Timer and drop unused connections from the precompile workload - #15
Open
deveshjawla wants to merge 1 commit into
Open
deveshjawla wants to merge 1 commit into
deveshjawla wants to merge 1 commit into
Conversation
…ecompile workload Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Two leftover handles stop a process from becoming idle, which makes PackageCompiler's
create_app/create_sysimagehang when MQTTClient is a dependency.1.
keep_alive_loopnever closes itsTimer(src/client.jl)timer = Timer(0; interval=check_interval)is a repeating timer. When the loop exits (afterdisconnect), the function returns without closing it. The libuv handle stays active until theTimerhappens to be garbage collected, so the process keeps a live timer after every disconnect. PackageCompiler waits for background tasks, IO and timers to finish before it snapshots the process, so it waits indefinitely. Fix:close(timer)before returning.2. Two unused
MakeConnectioncalls in the precompile workload (ext/PrecompileMQTT.jl)Nothing in the workload uses these results. The second call runs a DNS lookup of
test.mosquitto.org(getaddrinfo) at precompile time, which needs network access and makes precompilation depend on an outside host. Removing both lines leaves the rest of the workload unchanged.Testing:
Pkg.test()with Mosquitto on localhost:1883 passes the same as onmain: client tests 79/79, utils 26/26, integration 20/20, plus the TCP smoke tests. We have used these two changes in a vendored copy for some time, and with themcreate_appcompletes.mainalso has #14 (the Windows pipe fix), which has not been released since v0.3.1. A release with these would let us drop our vendored copy.🤖 Generated with Claude Code