Skip to content

Commit cb9af76

Browse files
committed
Temp changes::
1 parent 73243b6 commit cb9af76

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

internal/transport/http2_client.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
460460
// after draining any remaining incoming data.
461461
t.conn.Close()
462462
}
463+
t.logger.Infof("Closing writerDone channel")
463464
close(t.writerDone)
464465
}()
465466
defer func() {
@@ -1005,13 +1006,7 @@ func (t *http2Client) Close(err error) {
10051006
// ever starts to take in an HTTP/2 error code the peer will be able to get more information about the reason
10061007
// behind the connection close.
10071008
t.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte(fmt.Sprintf("client shutdown with: %v", err)), closeConnErr: err})
1008-
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
1009-
defer cancel()
1010-
select {
1011-
case <-t.writerDone:
1012-
case <-ctx.Done():
1013-
t.logger.Infof("Context timed out")
1014-
}
1009+
<-t.writerDone
10151010
t.cancel()
10161011
t.conn.Close()
10171012
channelz.RemoveEntry(t.channelz.ID)

0 commit comments

Comments
 (0)