Skip to content

ts_derp, ts_runtime: don't panic on runtime shutdown - #470

Open
nrc wants to merge 1 commit into
mainfrom
nrc/rt-shutdown
Open

nrc wants to merge 1 commit into
mainfrom
nrc/rt-shutdown

Conversation

@nrc

@nrc nrc commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

As a side-effect, adds a new error for when we can't find a derp server. This is expected to happen if the runtime has been shutdown, but presumably could happen for other reasons too.

These panics turned up when testing the node.js bindings (#462) and this PR is extracted from that one.

AI decl: Claude did this to fix some failing tests. I've reviewed and edited, but I don't know if this is the correct approach.

cc @npry

Signed-off-by: Nick Cameron <nrc@ncameron.org>

@npry npry left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I held off on this one (my branch with similar diff) because this actually breaks due to how kameo handles linked actors. Iirc, not panicking will cause the uniderp runner task to never restart itself, while the panic looks worse because it prints in process stdout, but it actually does the right thing (because kameo only restarts links on error I think? so the panic causes the supervision logic to restart it, while the caught error means it exits normally and isn't restarted).

It's definitely the right thing to do in ts_derp to produce an error rather than panicking if we don't have servers, but ts_runtime needs some adjustment as well to make this work properly

This branch has not been deployed

No deployments
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.

2 participants