mirror of https://github.com/grpc/grpc-java.git
Quick work around for Rst bug
This commit is contained in:
parent
a508c1d4f5
commit
345773504c
|
|
@ -226,7 +226,11 @@ class NettyClientHandler extends Http2ConnectionHandler {
|
||||||
private void onRstStreamRead(int streamId, long errorCode) throws Http2Exception {
|
private void onRstStreamRead(int streamId, long errorCode) throws Http2Exception {
|
||||||
NettyClientStream stream = clientStream(requireHttp2Stream(streamId));
|
NettyClientStream stream = clientStream(requireHttp2Stream(streamId));
|
||||||
Status status = GrpcUtil.Http2Error.statusForCode((int) errorCode);
|
Status status = GrpcUtil.Http2Error.statusForCode((int) errorCode);
|
||||||
stream.transportReportStatus(status, false, new Metadata());
|
// TODO(carl-mastrangelo): This is a hack! Currently, due to a bug in the deframer, the stream
|
||||||
|
// listener might not be closed if the stream is stopped while in the middle of a recieving a
|
||||||
|
// message. This is a quick work around to get things working again, but should be changed
|
||||||
|
// back to not stopping delivery once a proper, thought-out fix is in place in the Deframer.
|
||||||
|
stream.transportReportStatus(status, true /*stop delivery*/, new Metadata());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue