Satisfy write promise when writing an Http2WindowUpdateFrame to Http2FrameCodec.
Motivation: When writing an Http2WindowUpdateFrame to an Http2FrameCodec, the ChannelPromise is never satisfied, so callers cannot generically rely on the write future being satisfied on success. Modifications: When writing Http2WindowUpdateFrame, Http2FrameCodec now satisfies the ChannelPromise immediately. Result: The write future is satisfied on successful writes. Fixes netty/netty#5530.
This commit is contained in:
parent
9de90d07a9
commit
f2ce28bf18
@ -142,6 +142,7 @@ public class Http2FrameCodec extends ChannelDuplexHandler {
|
||||
if (msg instanceof Http2WindowUpdateFrame) {
|
||||
Http2WindowUpdateFrame frame = (Http2WindowUpdateFrame) msg;
|
||||
consumeBytes(frame.streamId(), frame.windowSizeIncrement());
|
||||
promise.setSuccess();
|
||||
} else if (msg instanceof Http2StreamFrame) {
|
||||
writeStreamFrame((Http2StreamFrame) msg, promise);
|
||||
} else if (msg instanceof Http2GoAwayFrame) {
|
||||
|
Loading…
Reference in New Issue
Block a user