Skip to content

Commit

Permalink
[loop] change posix check when logging
Browse files Browse the repository at this point in the history
  • Loading branch information
wkgcass committed Sep 14, 2023
1 parent baa154d commit 1e52cdc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -390,7 +391,7 @@ public void writable(HandlerContext<SocketFD> 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" +
Expand Down

0 comments on commit 1e52cdc

Please sign in to comment.