• Steven Allen's avatar
    fix: get rid of shutdown errors · efdb8db2
    Steven Allen authored
    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.
    efdb8db2
builder.go 2.01 KB