Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ private int processWrite(int state, final Object userData, int pos, int length)
if (done || exchange == null) {
throw new ClosedChannelException();
}
boolean buffDone = true;
ByteBuffer buffer = null;
try {
assert state != STATE_BODY;
Expand Down Expand Up @@ -157,6 +158,8 @@ private int processWrite(int state, final Object userData, int pos, int length)
res = next.write(data, 0, length + 1);
}
if (res == 0) {
// UNDERTOW-2588 - skip bufferDone() for a STATE_BUF_FLUSH return
buffDone = false;
return STATE_BUF_FLUSH;
}
} while (buffer.hasRemaining());
Expand Down Expand Up @@ -291,12 +294,15 @@ private int processWrite(int state, final Object userData, int pos, int length)
res = next.write(data, 0, index + length);
}
if (res == 0) {
// UNDERTOW-2588 - skip bufferDone() for a STATE_BUF_FLUSH return
buffDone = false;
return STATE_BUF_FLUSH;
}
} while (buffer != null && buffer.hasRemaining());
return STATE_BODY;
} finally {
if (buffer != null) {
if (buffer != null && buffDone) {
// UNDERTOW-2588 - skip this for a STATE_BUF_FLUSH return
bufferDone();
this.state &= ~POOLED_BUFFER_IN_USE;
}
Expand Down
Loading