From 61944353137d3b11b6dc9043e545d4a52095b4f5 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 12 Jun 2021 13:22:10 +0100 Subject: [PATCH] Disable io_uring for now It isn't compatible with FileRegion, which breaks the HTTP/JAGGRAB server. Signed-off-by: Graham --- net/src/main/kotlin/org/openrs2/net/BootstrapFactory.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/src/main/kotlin/org/openrs2/net/BootstrapFactory.kt b/net/src/main/kotlin/org/openrs2/net/BootstrapFactory.kt index 063cd6cf..df570442 100644 --- a/net/src/main/kotlin/org/openrs2/net/BootstrapFactory.kt +++ b/net/src/main/kotlin/org/openrs2/net/BootstrapFactory.kt @@ -16,7 +16,6 @@ import io.netty.channel.kqueue.KQueueSocketChannel import io.netty.channel.nio.NioEventLoopGroup import io.netty.channel.socket.nio.NioServerSocketChannel import io.netty.channel.socket.nio.NioSocketChannel -import io.netty.incubator.channel.uring.IOUring import io.netty.incubator.channel.uring.IOUringEventLoopGroup import io.netty.incubator.channel.uring.IOUringServerSocketChannel import io.netty.incubator.channel.uring.IOUringSocketChannel @@ -29,7 +28,11 @@ public class BootstrapFactory @Inject constructor( ) { public fun createEventLoopGroup(): EventLoopGroup { return when { - IOUring.isAvailable() -> IOUringEventLoopGroup() + /* + * XXX(gpe): disable io_uring for now, it's incompatible with + * FileRegion. + */ + // IOUring.isAvailable() -> IOUringEventLoopGroup() Epoll.isAvailable() -> EpollEventLoopGroup() KQueue.isAvailable() -> KQueueEventLoopGroup() else -> NioEventLoopGroup()