Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don’t close connection if already closing
When a peer is shutdown, if the gateway attempts to send a proposal to it, it will fail and the gateway will close the connection and remove it from its registry. Under stress, with multiple concurrent goroutines all attempting to use and then close the connection, the log gets flooded with the messages: - (INFO) Attempting to close - (ERROR) Failed to close. This commit changes the behaviour so that it checks the grpc state before logging and attempting to close. If it’s already shutting down, then it’s a no-op. Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
- Loading branch information