Panic containment
This release makes it no longer possible for a panic in your handler chain to take down the entire process.
The recover middleware was only guarding the middlewares you passed to it, and then called the next handler outside that protection, so a panic from anything downstream slipped through. The goroutine that forwards window size changes to a Bubble Tea program also had no recovery, and since the recover only catches panics on its own goroutine, the middleware could never have seen that one anyway.
Both are fixed. Panics get logged by your configured logger, and a panic in the resize watcher now quits the program so the session ends cleanly instead of leaving a broken resize handler.
This pairs with charm.land/ssh v0.4.2, which contains panics per connection down in the SSH layer.
Changelog
Fixed
- 234f185: fix: contain panics in the terminal resize watcher (@taciturnaxolotl)
- 14b2efd: fix: recover from panics in the whole handler chain (@taciturnaxolotl)
Other stuff
- 1dc2e41: chore(deps): bump charm.land/ssh to v0.4.2 (@taciturnaxolotl)
- 76f2bdd: v2.0.3 (@taciturnaxolotl)
Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.