Don't send a window update if the length is zero.
This commit is contained in:
parent
6dfa452e29
commit
69927b935e
|
@ -99,9 +99,13 @@ public class HTTP2FlowControl implements FlowControl
|
|||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Data consumed, increasing window by {} for {}", length, stream);
|
||||
// Negative streamId allow for generation of bytes for both stream and session
|
||||
WindowUpdateFrame frame = new WindowUpdateFrame(-stream.getId(), length);
|
||||
stream.getSession().control(stream, frame, Callback.Adapter.INSTANCE);
|
||||
|
||||
if (length > 0)
|
||||
{
|
||||
// Negative streamId allow for generation of bytes for both stream and session
|
||||
WindowUpdateFrame frame = new WindowUpdateFrame(-stream.getId(), length);
|
||||
stream.getSession().control(stream, frame, Callback.Adapter.INSTANCE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue