소스 검색

UploadPack: Avoid unnecessary flush in smart HTTP

Under smart HTTP the biDirectionalPipe flag is false, and we return
back immediately at this point in the negotiation process.  There is
no need to flush the stream to the client, the request is over and
it will be automatically flushed out by the higher level servlet
that invoked us.  Avoiding flush here allows us to only use flush
after a progress message is sent during pack generation.

Change-Id: Id0c8b7e95e3be6ca4c1b479e096bed6b0283b828
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
tags/v0.9.1
Shawn O. Pearce 14 년 전
부모
커밋
5ed96eb7f4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

+ 1
- 1
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java 파일 보기

@@ -428,9 +428,9 @@ public class UploadPack {
if (line == PacketLineIn.END) {
if (commonBase.isEmpty() || multiAck != MultiAck.OFF)
pckOut.writeString("NAK\n");
pckOut.flush();
if (!biDirectionalPipe)
return false;
pckOut.flush();

} else if (line.startsWith("have ") && line.length() == 45) {
final ObjectId id = ObjectId.fromString(line.substring(5));

Loading…
취소
저장