Skip to content

fix(modbus-slave): abort the server task on stop#11

Merged
ashaffah merged 1 commit into
mainfrom
fix/modbus-slave-task-leak
Jun 26, 2026
Merged

fix(modbus-slave): abort the server task on stop#11
ashaffah merged 1 commit into
mainfrom
fix/modbus-slave-task-leak

Conversation

@ashaffah

Copy link
Copy Markdown
Owner

The slave spawned its TCP/RTU server as a detached task that outlived the node, so stopping or redeploying left the listener bound — a redeploy on the same port then failed and an orphan server kept serving the old map.

Hold the server task in an AbortOnDrop guard so it is aborted when the node stops. Verified: stop + redeploy on the same port rebinds cleanly (no bind_error; previously the port stayed held).

The slave spawned its TCP/RTU server as a detached task that outlived the
node, so stopping or redeploying left the listener bound — a redeploy on
the same port then failed and an orphan server kept serving the old map.

Hold the server task in an AbortOnDrop guard so it is aborted when the
node stops. Verified: stop + redeploy on the same port rebinds cleanly
(no bind_error; previously the port stayed held).
@ashaffah ashaffah merged commit a92bed4 into main Jun 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant