grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

transport/http2_client: add timeout for writing GOAWAY on client.Close()

Open aranjans opened this issue 7 months ago • 3 comments

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.

aranjans avatar Jul 01 '24 08:07 aranjans