AbstractPollingIoProcessor
--------------------------
Key: DIRMINA-671
URL: https://issues.apache.org/jira/browse/DIRMINA-671
Project: MINA
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0-M4
Reporter: Aaron Wald
Priority: Minor
In flushNow() it appears to me that when writeBuffer is called, when the buffer
is completely sent, we will always come into the buffer isn't empty check.
if (message instanceof IoBuffer) {
localWrittenBytes = writeBuffer(
session, req, hasFragmentation,
maxWrittenBytes - writtenBytes,
currentTime);
if (localWrittenBytes > 0 &&
((IoBuffer)message).hasRemaining() ) {
// the buffer isn't empty, we re-interest it in writing
writtenBytes += localWrittenBytes;
setInterestedInWrite(session, true);
return false;
}
}
In writeBuffer this is done:
if (!buf.hasRemaining() ||
!hasFragmentation && localWrittenBytes != 0) {
// Buffer has been sent, clear the current request.
buf.reset();
fireMessageSent(session, req);
}
fireMessageSent clears the write request, so when we come back after select()
we wont double send data but it seems like twice the work is being done.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.