From 15be442cb28d1fc038490d5efd360aa113962df8 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 8 May 2020 01:16:46 +0200 Subject: [PATCH] Fixed session bootstrap for updated version of netty --- src/io/netty/bootstrap/SessionBootstrap.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/io/netty/bootstrap/SessionBootstrap.java b/src/io/netty/bootstrap/SessionBootstrap.java index 3e1e3e18..fd22dbc7 100644 --- a/src/io/netty/bootstrap/SessionBootstrap.java +++ b/src/io/netty/bootstrap/SessionBootstrap.java @@ -214,20 +214,8 @@ class SessionBootstrap extends AbstractBootstrap { @Override void init(Channel channel) throws Exception { - final Map, Object> options = options0(); - synchronized (options) { - setChannelOptions(channel, options, logger); - } - - final Map, Object> attrs = attrs0(); - synchronized (attrs) { - for (Entry, Object> e : attrs.entrySet()) { - @SuppressWarnings("unchecked") - AttributeKey key = (AttributeKey) e.getKey(); - channel.attr(key) - .set(e.getValue()); - } - } + setChannelOptions(channel, options0().entrySet().toArray(EMPTY_OPTION_ARRAY), logger); + setAttributes(channel, attrs0().entrySet().toArray(EMPTY_ATTRIBUTE_ARRAY)); ChannelPipeline p = channel.pipeline();