Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make inmemPipeline check that it's not closed before sending RPCs
This change fixes a race inside between the shutdownCh and the consumerCh in the select statement of inmempipeLine.AppendEntries, which could otherwise forward an RPC request to the consumer even if the transport was closed with InmemTransport.Close(). See also hashicorp#275 for a sample program that reproduces the race if ran long enough. The same program doesn't fail anymore with this change applied.
- Loading branch information