Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pubsub: fix potential deadlock in startConnections (#1674)
If a subscriber connection fails, awaitRunning will throw IllegalStateException. We must make sure that we count down the latch in either case; otherwise startup will deadlock. Also move the call to addListener above startAsync. Otherwise, the listener might not see the connection failing if it fails too quickly.
- Loading branch information