Skip to content

Commit

Permalink
Merge pull request #88 from DeNA/fix_http2_output_stream_flush
Browse files Browse the repository at this point in the history
HTTP2のOutputStreamがflushされてなくて処理が遅くなっていたのを修正
  • Loading branch information
funa-tk authored Apr 13, 2021
2 parents 67ba904 + 2d8fdec commit 7827e75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/core/packetproxy/http2/FlowControlManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,14 @@ public void write(Frame frame) throws Exception {
if (frame.getType() == Frame.Type.HEADERS) {
/* TODO: maximum concurrent streams is not implemented yet */
outputForFlowControl.write(frame.toByteArray());
outputForFlowControl.flush();
} else if (frame.getType() == Frame.Type.DATA) {
FlowControl flow = getFlow(frame.getStreamId());
flow.enqueue(frame);
writeData(flow);
} else {
outputForFlowControl.write(frame.toByteArray());
outputForFlowControl.flush();
}
}

Expand Down

0 comments on commit 7827e75

Please sign in to comment.