Eagerly initialize Netty 4
Today we initialize Netty in a static initializer. We trigger this method via static initializers from Netty-related classes, but we can trigger this method earlier than we do to ensure that Netty is initialized how we want it to be.
This commit is contained in:
parent
2aa89820f3
commit
df43c268da
|
@ -32,6 +32,7 @@ import org.elasticsearch.plugins.NetworkPlugin;
|
|||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.netty4.Netty4Transport;
|
||||
import org.elasticsearch.transport.netty4.Netty4Utils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
@ -41,6 +42,10 @@ import java.util.function.Supplier;
|
|||
|
||||
public class Netty4Plugin extends Plugin implements NetworkPlugin {
|
||||
|
||||
static {
|
||||
Netty4Utils.setup();
|
||||
}
|
||||
|
||||
public static final String NETTY_TRANSPORT_NAME = "netty4";
|
||||
public static final String NETTY_HTTP_TRANSPORT_NAME = "netty4";
|
||||
|
||||
|
|
Loading…
Reference in New Issue