From df0ff176d4a79239ee3ebfe4925819d411fe2dc5 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sat, 22 Sep 2012 19:50:43 +0200 Subject: [PATCH] add simpler way to set the epoll bug workaround flag for netty --- .../elasticsearch/http/netty/NettyHttpServerTransport.java | 5 +++++ .../org/elasticsearch/transport/netty/NettyTransport.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java b/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java index fc93cc863e7..0661d5311a0 100644 --- a/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java +++ b/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java @@ -112,6 +112,11 @@ public class NettyHttpServerTransport extends AbstractLifecycleComponent implem this.threadPool = threadPool; this.networkService = networkService; + if (settings.getAsBoolean("netty.epollBugWorkaround", false)) { + System.setProperty("org.jboss.netty.epollBugWorkaround", "true"); + } + this.connectMutex = new Object[500]; for (int i = 0; i < connectMutex.length; i++) { connectMutex[i] = new Object();