Disable io_uring for now

It isn't compatible with FileRegion, which breaks the HTTP/JAGGRAB
server.

Signed-off-by: Graham <gpe@openrs2.org>
pull/132/head
Graham 3 years ago
parent f6c28e2b40
commit 6194435313
  1. 7
      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()

Loading…
Cancel
Save