Skip to content

Commit 7e58f98

Browse files
committedJun 14, 2024
[quic] add vfd check for quic
1 parent aa80711 commit 7e58f98

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎base/src/main/java/io/vproxy/base/component/elgroup/EventLoopGroup.java

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import io.vproxy.pni.PNIRef;
2222
import io.vproxy.pni.PooledAllocator;
2323
import io.vproxy.pni.array.IntArray;
24+
import io.vproxy.vfd.FDProvider;
25+
import io.vproxy.vfd.posix.PosixFDs;
2426

2527
import java.io.IOException;
2628
import java.util.ArrayList;
@@ -74,6 +76,9 @@ private Registration initQuic() throws XException {
7476
if (!MsQuicInitializer.isSupported()) {
7577
throw new XException("msquic is not supported");
7678
}
79+
if (!(FDProvider.get().getProvided() instanceof PosixFDs)) {
80+
throw new XException("vfd impl (" + FDProvider.get().getProvided() + ") does not support quic, please add -Dvfd=posix on startup");
81+
}
7782

7883
var api = ApiTables.V2;
7984
var allocator = PooledAllocator.ofUnsafePooled();

0 commit comments

Comments
 (0)