Previously, when hitting an error, RequestDispatch would stop immediately without doing any cleanup. The pending requests channel would be close on drop, but any requests that were already in the channel would hang indefinitely.
With this PR, RequestDispatch will do a better cleanup job: it will close and drain the the pending requests, completing each request with the same error that caused the RequestDispatch to halt.
Previously, when hitting an error, RequestDispatch would stop immediately without doing any cleanup. The pending requests channel would be close on drop, but any requests that were already in the channel would hang indefinitely.
With this PR, RequestDispatch will do a better cleanup job: it will close and drain the the pending requests, completing each request with the same error that caused the RequestDispatch to halt.
Fixes https://github.com/google/tarpc/issues/415