Adds a test that confirms that unary RPCs can leak goroutines when the RPC is cancelled or is deadline is exceeded. Adds a fix: writes to channel must use select operation to respect RPC context. Otherwise, channel write operation can block indefinitely (causing goroutine to leak) because there is nothing reading the channel.
Adds a test that confirms that unary RPCs can leak goroutines when the RPC is cancelled or is deadline is exceeded. Adds a fix: writes to channel must use
select
operation to respect RPC context. Otherwise, channel write operation can block indefinitely (causing goroutine to leak) because there is nothing reading the channel.