Only try to bind if late registration not failed.

Motivation:

We should not try to call bind if registration failed.

Modifications:

Only call doBind0(...) when the registration not failed.

Result:

Not try to to bind if the registration failed.
This commit is contained in:
Norman Maurer 2016-05-12 13:14:52 +02:00
parent 30bb3094c1
commit 5ffa3b1c46

View File

@ -304,8 +304,9 @@ public abstract class AbstractBootstrap<B extends AbstractBootstrap<B, C>, C ext
// Registration was successful, so set the correct executor to use.
// See https://github.com/netty/netty/issues/2586
promise.executor = channel.eventLoop();
doBind0(regFuture, channel, localAddress, promise);
}
doBind0(regFuture, channel, localAddress, promise);
}
});
return promise;