This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make upstream.Close() wait for shutdown
We let main() exit, and block on graceful shutdown in a `defer`ed procedure. We _also_ `defer` a call to `upstream.Close()`, which stops the upstream reconnecting and closes it. The two deferred procedure calls used to be in such an order that by coincidence, `upstream.Close()` was _also_ blocked on graceful shutdown. But this order was shuffled in PR #962. This commit makes the `upstream.Close()` explicitly wait for shutdown.
- Loading branch information