mirror of https://github.com/grpc/grpc-go.git
clean up underlying footprint when Stream.Done() is read
This commit is contained in:
parent
0223eb7067
commit
c9f0b89a96
|
|
@ -190,7 +190,8 @@ func NewClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth
|
|||
case <-t.Error():
|
||||
// Incur transport error, simply exit.
|
||||
case <-s.Done():
|
||||
// Simply exit. Leave the next I/O op to do cleanup.
|
||||
cs.finish(err)
|
||||
cs.closeTransportStream(nil)
|
||||
case <-s.Context().Done():
|
||||
err := s.Context().Err()
|
||||
cs.finish(err)
|
||||
|
|
|
|||
|
|
@ -692,6 +692,8 @@ func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) {
|
|||
grpclog.Println("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error ", f.ErrCode)
|
||||
s.statusCode = codes.Unknown
|
||||
}
|
||||
//grpclog.Println("DEBUG handleRSTStram: ", f, " | ", f.ErrCode)
|
||||
close(s.done)
|
||||
s.mu.Unlock()
|
||||
s.write(recvMsg{err: io.EOF})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue