Open brooks-connor-a opened 2 years ago
Thanks for reporting @brooks-connor-a, ran into this also.
(Firing up background Tor process, then panic, then it isn't cleaned up)
I took a look at this, it seems like the best way to solve was to recover the panic and write to the errs
channel. Happy for some feedback if it's not in the spirit of how bubbletea works.
Panics are handled by recovering the panic and gracefully tearing down the Program. However goroutines started within the Program are outside the scope of the recover, and as such can end in the program terminating without properly tearing down. This can result in the terminal getting stuck in a non-interactive state until it is reset.
Here's a minimal reproduction: