Fixed RemoteQuery, which broke with the Epoll update

This commit is contained in:
RuriRyan
2014-06-25 23:29:08 +02:00
parent 4ac117fb4c
commit 489242b1ef
3 changed files with 11 additions and 4 deletions

View File

@@ -280,7 +280,7 @@ public class BungeeCord extends ProxyServer
}
}
};
new RemoteQuery( this, info ).start( new InetSocketAddress( info.getHost().getAddress(), info.getQueryPort() ), eventLoops, bindListener );
new RemoteQuery( this, info ).start(PipelineUtils.getDatagramChannel(), new InetSocketAddress( info.getHost().getAddress(), info.getQueryPort() ), eventLoops, bindListener );
}
}
}

View File

@@ -7,10 +7,12 @@ import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.ServerChannel;
import io.netty.channel.epoll.EpollDatagramChannel;
import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.channel.epoll.EpollServerSocketChannel;
import io.netty.channel.epoll.EpollSocketChannel;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioDatagramChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.timeout.ReadTimeoutHandler;
@@ -114,6 +116,11 @@ public class PipelineUtils
{
return epoll ? EpollSocketChannel.class : NioSocketChannel.class;
}
public static Class<? extends Channel> getDatagramChannel()
{
return epoll ? EpollDatagramChannel.class : NioDatagramChannel.class;
}
public final static class Base extends ChannelInitializer<Channel>
{