优化doWrite

This commit is contained in:
redkale
2023-01-28 11:58:27 +08:00
parent 2a7f0901af
commit 83b4887dd6

View File

@@ -192,7 +192,7 @@ abstract class AsyncNioConnection extends AsyncConnection {
newHandler.handler(handler, null); // new AsyncNioCompletionHandler(handler, null);
this.writeCompletionHandler = newHandler;
}
doWrite(this.ioWriteThread.inCurrThread()); //如果不是true则bodyCallback的执行可能会切换线程
doWrite(true); //如果不是true则bodyCallback的执行可能会切换线程
}
@Override
@@ -218,7 +218,7 @@ abstract class AsyncNioConnection extends AsyncConnection {
} else {
this.writeCompletionHandler = (CompletionHandler) handler;
}
doWrite(this.ioWriteThread.inCurrThread());
doWrite(true);
}
@Override
@@ -246,7 +246,7 @@ abstract class AsyncNioConnection extends AsyncConnection {
} else {
this.writeCompletionHandler = (CompletionHandler) handler;
}
doWrite(this.ioWriteThread.inCurrThread());
doWrite(true);
}
public void doRead(boolean direct) {