Quick work around for Rst bug

This commit is contained in:
Carl Mastrangelo 2015-08-24 10:57:24 -07:00
parent a508c1d4f5
commit 345773504c
1 changed files with 5 additions and 1 deletions

View File

@ -226,7 +226,11 @@ class NettyClientHandler extends Http2ConnectionHandler {
private void onRstStreamRead(int streamId, long errorCode) throws Http2Exception {
NettyClientStream stream = clientStream(requireHttp2Stream(streamId));
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