Skip to content
Open
Changes from 1 commit
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,7 @@ private int processWrite(int state, final Object userData, int pos, int length)
res = next.write(data, 0, length + 1);
}
if (res == 0) {
buffDone = false;
return STATE_BUF_FLUSH;
}
} while (buffer.hasRemaining());
Expand Down Expand Up @@ -291,12 +293,13 @@ private int processWrite(int state, final Object userData, int pos, int length)
res = next.write(data, 0, index + length);
}
if (res == 0) {
buffDone = false;
return STATE_BUF_FLUSH;
}
} while (buffer != null && buffer.hasRemaining());
return STATE_BODY;
} finally {
if (buffer != null) {
if (buffer != null && buffDone) {
bufferDone();
this.state &= ~POOLED_BUFFER_IN_USE;
}
Expand Down
Loading