Skip to content

Commit

Permalink
Merge pull request #324 from project-tsurugi/wip/tcp_flush
Browse files Browse the repository at this point in the history
do flush() after writing a request to outStream
  • Loading branch information
t-horikawa authored Sep 4, 2023
2 parents b5aea9c + 741368a commit 8f6804f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ private void send(byte i, int s) throws IOException { // SESSION_HELLO, RESULT_
throw new IOException("socket is already closed");
}
outStream.write(header, 0, header.length);
outStream.flush();
}
LOG.trace("send {}, slot = {}", ((i == REQUEST_SESSION_HELLO) ? "SESSION_HELLO" : "RESULT_SET_BYE_OK"), s); //$NON-NLS-1$
}
Expand Down Expand Up @@ -239,6 +240,7 @@ public void send(int s, byte[] frameHeader, byte[] payload, ChannelResponse chan
outStream.write(frameHeader, 0, frameHeader.length);
outStream.write(payload, 0, payload.length);
}
outStream.flush();
} catch (IOException e) {
channelResponse.setMainResponse(e);
return;
Expand Down

0 comments on commit 8f6804f

Please sign in to comment.