mirror of https://github.com/grpc/grpc-go.git
transport: http2Client sends RST_STREAM (#2354)
If http2Client receives END_STREAM before it sends END_STREAM, it will send RST_STREAM to fully closed the stream.
This commit is contained in:
parent
f1b28afd42
commit
1da8e51941
|
|
@ -1173,7 +1173,9 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
|
||||||
if !endStream {
|
if !endStream {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
t.closeStream(s, io.EOF, false, http2.ErrCodeNo, state.status(), state.mdata, true)
|
// if client received END_STREAM from server while stream was still active, send RST_STREAM
|
||||||
|
rst := s.getState() == streamActive
|
||||||
|
t.closeStream(s, io.EOF, rst, http2.ErrCodeNo, state.status(), state.mdata, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// reader runs as a separate goroutine in charge of reading data from network
|
// reader runs as a separate goroutine in charge of reading data from network
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue