Issue #2349 - Review HTTP/2 max streams enforcement.

Restored code that was deleted by mistake.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2018-07-04 11:12:34 +02:00
parent 9d9189d476
commit 635cf4d374
1 changed files with 5 additions and 2 deletions

View File

@ -1324,7 +1324,8 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
int length = Math.min(dataRemaining, window);
// Only one DATA frame is generated.
int frameBytes = generator.data(lease, (DataFrame)frame, length);
DataFrame dataFrame = (DataFrame)frame;
int frameBytes = generator.data(lease, dataFrame, length);
this.frameBytes += frameBytes;
this.frameRemaining += frameBytes;
@ -1332,10 +1333,12 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
this.dataBytes += dataBytes;
this.dataRemaining -= dataBytes;
if (LOG.isDebugEnabled())
LOG.debug("Generated {}, length/window/data={}/{}/{}", frame, dataBytes, window, dataRemaining);
LOG.debug("Generated {}, length/window/data={}/{}/{}", dataFrame, dataBytes, window, dataRemaining);
flowControl.onDataSending(stream, dataBytes);
stream.updateClose(dataFrame.isEndStream(), CloseState.Event.BEFORE_SEND);
return true;
}