fix: get rid of shutdown errors
Instead of feeding through the top-level context, feed through a cancel-free context (that still carries the same context values). Then, when the top-level context is canceled, call `stop` to shut everything down in-order. Finally, cancel the inner context to make sure everything has been cleaned up. Ideally, we just wouldn't use contexts for this. But this is strictly better than what we have.
Showing
Please register or sign in to comment