Showing
1 changed file
with
2 additions
and
9 deletions
| ... | @@ -17,8 +17,6 @@ import io.netty.channel.ChannelInitializer; | ... | @@ -17,8 +17,6 @@ import io.netty.channel.ChannelInitializer; |
| 17 | import io.netty.channel.ChannelOption; | 17 | import io.netty.channel.ChannelOption; |
| 18 | import io.netty.channel.EventLoopGroup; | 18 | import io.netty.channel.EventLoopGroup; |
| 19 | import io.netty.channel.SimpleChannelInboundHandler; | 19 | import io.netty.channel.SimpleChannelInboundHandler; |
| 20 | -import io.netty.channel.epoll.EpollEventLoopGroup; | ||
| 21 | -import io.netty.channel.epoll.EpollSocketChannel; | ||
| 22 | import io.netty.channel.nio.NioEventLoopGroup; | 20 | import io.netty.channel.nio.NioEventLoopGroup; |
| 23 | import io.netty.channel.socket.SocketChannel; | 21 | import io.netty.channel.socket.SocketChannel; |
| 24 | import io.netty.channel.socket.nio.NioServerSocketChannel; | 22 | import io.netty.channel.socket.nio.NioServerSocketChannel; |
| ... | @@ -57,13 +55,8 @@ public class NettyMessagingService implements MessagingService { | ... | @@ -57,13 +55,8 @@ public class NettyMessagingService implements MessagingService { |
| 57 | 55 | ||
| 58 | // TODO: make this configurable. | 56 | // TODO: make this configurable. |
| 59 | private void initEventLoopGroup() { | 57 | private void initEventLoopGroup() { |
| 60 | - try { | 58 | + workerGroup = new NioEventLoopGroup(); |
| 61 | - workerGroup = new EpollEventLoopGroup(); | 59 | + channelClass = NioSocketChannel.class; |
| 62 | - channelClass = EpollSocketChannel.class; | ||
| 63 | - } catch (Throwable t) { | ||
| 64 | - workerGroup = new NioEventLoopGroup(); | ||
| 65 | - channelClass = NioSocketChannel.class; | ||
| 66 | - } | ||
| 67 | } | 60 | } |
| 68 | 61 | ||
| 69 | public NettyMessagingService() { | 62 | public NettyMessagingService() { | ... | ... |
-
Please register or login to post a comment