Fixed issue: NETTY-204 Connection timeout does not work with the NIO socket transport.

* DefaultChannelConfig.setOption() does not handle connectTimeoutMillis
This commit is contained in:
Trustin Lee 2009-08-14 20:36:32 +00:00
parent 7ffd228cbf
commit adc1969d6c

View File

@ -29,6 +29,7 @@ import org.jboss.netty.buffer.ChannelBufferFactory;
import org.jboss.netty.buffer.HeapChannelBufferFactory;
import org.jboss.netty.channel.socket.SocketChannelConfig;
import org.jboss.netty.handler.timeout.WriteTimeoutHandler;
import org.jboss.netty.util.internal.ConversionUtil;
/**
* The default {@link SocketChannelConfig} implementation.
@ -60,6 +61,8 @@ public class DefaultChannelConfig implements ChannelConfig {
public boolean setOption(String key, Object value) {
if (key.equals("pipelineFactory")) {
setPipelineFactory((ChannelPipelineFactory) value);
} else if (key.equals("connectTimeoutMillis")) {
setConnectTimeoutMillis(ConversionUtil.toInt(value));
} else if (key.equals("bufferFactory")) {
setBufferFactory((ChannelBufferFactory) value);
} else {