Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #114 from dwightguth/race
Browse files Browse the repository at this point in the history
fix race between NGInputStream and NGOutputStream on the output socket
  • Loading branch information
sbalabanov authored Jan 17, 2018
2 parents 9acfd39 + d29e253 commit 0007cab
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ private synchronized void waitForChunk() throws IOException {
}

private synchronized void sendSendInput() throws IOException {
out.writeInt(0);
out.writeByte(NGConstants.CHUNKTYPE_SENDINPUT);
synchronized(out) {
out.writeInt(0);
out.writeByte(NGConstants.CHUNKTYPE_SENDINPUT);
}
out.flush();
started = true;
}
Expand Down

0 comments on commit 0007cab

Please sign in to comment.