AsyncNioConnection
This commit is contained in:
@@ -384,7 +384,6 @@ abstract class AsyncNioConnection extends AsyncConnection {
|
|||||||
int totalCount = 0;
|
int totalCount = 0;
|
||||||
boolean hasRemain = true;
|
boolean hasRemain = true;
|
||||||
boolean writeCompleted = true;
|
boolean writeCompleted = true;
|
||||||
boolean fastMode = false;
|
|
||||||
if (writeByteBuffer == null && writeByteBuffers == null && writeByteTuple1Array == null && fastWriteCount.get() > 0) {
|
if (writeByteBuffer == null && writeByteBuffers == null && writeByteTuple1Array == null && fastWriteCount.get() > 0) {
|
||||||
final ByteBuffer buffer = pollWriteBuffer();
|
final ByteBuffer buffer = pollWriteBuffer();
|
||||||
ByteBufferWriter writer = null;
|
ByteBufferWriter writer = null;
|
||||||
@@ -400,7 +399,6 @@ abstract class AsyncNioConnection extends AsyncConnection {
|
|||||||
writer.put(item);
|
writer.put(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fastMode = true;
|
|
||||||
this.writeBuffersOffset = 0;
|
this.writeBuffersOffset = 0;
|
||||||
if (writer == null) {
|
if (writer == null) {
|
||||||
this.writeByteBuffer = buffer.flip();
|
this.writeByteBuffer = buffer.flip();
|
||||||
@@ -501,7 +499,8 @@ abstract class AsyncNioConnection extends AsyncConnection {
|
|||||||
|
|
||||||
if (writeCompleted && (totalCount != 0 || !hasRemain)) {
|
if (writeCompleted && (totalCount != 0 || !hasRemain)) {
|
||||||
handleWrite(this.writeTotal + totalCount, null);
|
handleWrite(this.writeTotal + totalCount, null);
|
||||||
if (fastMode && fastWriteCount.get() > 0) {
|
if (fastWriteCount.get() > 0) {
|
||||||
|
this.writePending = true;
|
||||||
doWrite();
|
doWrite();
|
||||||
}
|
}
|
||||||
} else if (writeKey == null) {
|
} else if (writeKey == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user