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();