[#1715] Remove extra call socket.configureBlocking(false)

This commit is contained in:
Norman Maurer 2013-08-10 20:33:19 +02:00
parent 8af5ea8d4f
commit 280afda013

View File

@ -28,8 +28,6 @@ import io.netty.channel.nio.AbstractNioByteChannel;
import io.netty.channel.socket.DefaultSocketChannelConfig;
import io.netty.channel.socket.ServerSocketChannel;
import io.netty.channel.socket.SocketChannelConfig;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import java.io.IOException;
import java.net.InetSocketAddress;
@ -45,8 +43,6 @@ public class NioSocketChannel extends AbstractNioByteChannel implements io.netty
private static final ChannelMetadata METADATA = new ChannelMetadata(false);
private static final InternalLogger logger = InternalLoggerFactory.getInstance(NioSocketChannel.class);
private static SocketChannel newSocket() {
try {
return SocketChannel.open();
@ -79,21 +75,6 @@ public class NioSocketChannel extends AbstractNioByteChannel implements io.netty
*/
public NioSocketChannel(Channel parent, SocketChannel socket) {
super(parent, socket);
try {
socket.configureBlocking(false);
} catch (IOException e) {
try {
socket.close();
} catch (IOException e2) {
if (logger.isWarnEnabled()) {
logger.warn(
"Failed to close a partially initialized socket.", e2);
}
}
throw new ChannelException("Failed to enter non-blocking mode.", e);
}
config = new DefaultSocketChannelConfig(this, socket.socket());
}