Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
client: unbuffer fetches on Close to allow mangeFetchConcurrency to quit
The manageFetchConcurrency function only quits when active fetches hits zero. When a fetch is buffered, it's considered active. If the client closes, these buffered fetches will prevent manageFetchConcurrency from quitting because the buffered fetches are considered "active". The goroutine would only exit if a user calls PollFetches after Close. We now call PollFetches at the end of Close to ensure that everything is unbuffered. This also adds more comments as to flow ordering to help reason about correctness.
- Loading branch information