From b2dd3666407f4500032186813534672325450e8a Mon Sep 17 00:00:00 2001 From: Redkale <8730487+redkale@users.noreply.github.com> Date: Tue, 19 Nov 2019 20:47:16 +0800 Subject: [PATCH] --- src/org/redkale/net/AsyncConnection.java | 8 ++++---- src/org/redkale/net/TcpAioProtocolServer.java | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/org/redkale/net/AsyncConnection.java b/src/org/redkale/net/AsyncConnection.java index 8192cab9e..efa35352e 100644 --- a/src/org/redkale/net/AsyncConnection.java +++ b/src/org/redkale/net/AsyncConnection.java @@ -207,10 +207,10 @@ public abstract class AsyncConnection implements ReadableByteChannel, WritableBy } if (this.readBuffer != null) { Consumer consumer = this.bufferConsumer; - Thread thread = Thread.currentThread(); - if (thread instanceof IOThread) { - consumer = ((IOThread) thread).getBufferPool(); - } +// Thread thread = Thread.currentThread(); +// if (thread instanceof IOThread) { +// consumer = ((IOThread) thread).getBufferPool(); +// } consumer.accept(this.readBuffer); } if (attributes == null) return; diff --git a/src/org/redkale/net/TcpAioProtocolServer.java b/src/org/redkale/net/TcpAioProtocolServer.java index c4dc8a72d..c32f2c08e 100644 --- a/src/org/redkale/net/TcpAioProtocolServer.java +++ b/src/org/redkale/net/TcpAioProtocolServer.java @@ -104,7 +104,8 @@ public class TcpAioProtocolServer extends ProtocolServer { AsyncConnection conn = new TcpAioAsyncConnection(bufferPool, bufferPool, channel, context.getSSLContext(), null, context.readTimeoutSeconds, context.writeTimeoutSeconds, livingCounter, closedCounter); - context.runAsync(new PrepareRunner(context, responsePool, conn, null, null)); + //context.runAsync(new PrepareRunner(context, responsePool, conn, null, null)); + new PrepareRunner(context, responsePool, conn, null, null).run(); } catch (Throwable e) { context.logger.log(Level.INFO, channel + " accept error", e); }