Skip to content

Commit

Permalink
Fixing OOME that occurs when the byte buffer being written is large, …
Browse files Browse the repository at this point in the history
…and it causes the non-blocking stream to contain very large ByteBuffers.
  • Loading branch information
voidmain committed Aug 28, 2023
1 parent 66e9b77 commit 3717d2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.savant
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jackson5Version = "3.0.1"
restifyVersion = "4.2.0"
testngVersion = "7.8.0"

project(group: "io.fusionauth", name: "java-http", version: "0.2.1", licenses: ["ApacheV2_0"]) {
project(group: "io.fusionauth", name: "java-http", version: "0.2.2", licenses: ["ApacheV2_0"]) {
workflow {
fetch {
// Dependency resolution order:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void write(byte[] b, int off, int len) {
used = true;

// Set up the buffer to handle the bytes
setupBuffer(Math.max(bufferSize, len));
setupBuffer(bufferSize);

int length = Math.min(currentBuffer.remaining(), len);
currentBuffer.put(b, off, length);
Expand Down

0 comments on commit 3717d2d

Please sign in to comment.