grpc-go
grpc-go copied to clipboard
transport/http2_client: add timeout for writing GOAWAY on client.Close()
fixes #7314
Problem
In gRPC 1.64, we released a feature "Send GOAWAY to server on Client Transport Shutdown", post which in case of network hang when we are not able to write GOAWAY frame from client, closing connections will take a very long time.
What does this PR fix
This PR fixes this issue by having a timeout for loopyWriter to write GOAWAY so that http2Client.Close() doesn't wait for too long.
RELEASE NOTES:
- transport/http2_client: fix waiting on http2Client.Close() in case of network hang for writing GOAWAY.