From 9535401632c053253878981fd467181e480cc56e Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Sat, 7 Jul 2012 14:37:44 +0900 Subject: [PATCH] Revert unnecessary change in Bootstrap --- .../java/io/netty/bootstrap/ServerBootstrap.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java b/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java index 098ed8a1a3..0bb1d1d6bb 100755 --- a/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java +++ b/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java @@ -41,7 +41,6 @@ import java.nio.channels.ClosedChannelException; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; -import java.util.Queue; public class ServerBootstrap { @@ -167,6 +166,13 @@ public class ServerBootstrap { return future; } + try { + channel.config().setOptions(parentOptions); + } catch (Exception e) { + future.setFailure(e); + return future; + } + ChannelPipeline p = channel.pipeline(); if (handler != null) { p.addLast(handler); @@ -178,12 +184,6 @@ public class ServerBootstrap { future.setFailure(f.cause()); return future; } - try { - channel.config().setOptions(parentOptions); - } catch (Exception e) { - future.setFailure(e); - return future; - } if (!channel.isOpen()) { // Registration was successful but the channel was closed due to some failure in