Conversation
fe0cc80 to
bd2f62e
Compare
Clear all channel senders when the background reader detects server exit, add atexit handler to kill the server process, and replace the event loop's expect() with proper match-based error handling that detects server crashes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bd2f62e to
92e1eca
Compare
Liam-DeVoe
left a comment
There was a problem hiding this comment.
registering that I think our server handling logic in general is dirty and overly complicated and probably missing some cases, but I am happy to go with "it works" for now
Yes I agree. I don't like it at all, and I think there are demonstrably bugs lurking - we're getting some intermittent hangs in CI which I'm very suspicious about. I'm hoping that for now we can just cover it in tests until the problems all give up in terror. Part of the problem is that we've moved to the background thread model for performance and this makes error detection much harder to do. One of the virtues of the cooperative model is that streams just broke under you and you could immediately tell. I think it's worth considering moving back to that but with a better implementation. |
Fix the client hanging when the hegel server process exits unexpectedly:
.expect()