Skip to content

Commit

Permalink
do flush() after writing a request to outStream
Browse files Browse the repository at this point in the history
  • Loading branch information
t-horikawa committed Sep 4, 2023
1 parent b5aea9c commit 741368a
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 741368a

Please sign in to comment.