From 1e52cdcacb23293611d1ce6dd83a4a0531475dec Mon Sep 17 00:00:00 2001 From: wkgcass Date: Fri, 15 Sep 2023 02:59:09 +0800 Subject: [PATCH] [loop] change posix check when logging --- base/src/main/java/io/vproxy/base/connection/NetEventLoop.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/src/main/java/io/vproxy/base/connection/NetEventLoop.java b/base/src/main/java/io/vproxy/base/connection/NetEventLoop.java index 3167ce12..7dee940a 100644 --- a/base/src/main/java/io/vproxy/base/connection/NetEventLoop.java +++ b/base/src/main/java/io/vproxy/base/connection/NetEventLoop.java @@ -12,6 +12,7 @@ import io.vproxy.base.util.anno.ThreadSafe; import io.vproxy.base.util.coll.Tuple; import io.vproxy.vfd.*; +import io.vproxy.vfd.posix.PosixFDs; import java.io.IOException; import java.net.SocketTimeoutException; @@ -390,7 +391,7 @@ public void writable(HandlerContext ctx) { if (events.have(Event.WRITABLE)) { Logger.shouldNotHappen("the connection has nothing to write " + cctx.connection + " but events still have WRITABLE"); } else { - if (VFDConfig.vfdImpl.equals("posix") && OS.isLinux()) { + if (ctx.getEventLoop().fds instanceof PosixFDs && OS.isLinux()) { Logger.shouldNotHappen("the connection has nothing to write " + cctx.connection + ", firing without WRITABLE event watched" + ", vproxy detects that you are using vfdposix impl on Linux, which uses epoll" +