Skip to content

Instantly share code, notes, and snippets.

@jfarcand
Created October 14, 2010 17:03
Show Gist options
  • Save jfarcand/626569 to your computer and use it in GitHub Desktop.
Save jfarcand/626569 to your computer and use it in GitHub Desktop.
diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/index bee7ae9..addcd55 100644
--- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java
+++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java
@@ -42,10 +42,12 @@ import com.ning.http.util.AuthenticatorUtils;
import com.ning.http.util.SslUtils;
import com.ning.http.util.UTF8UrlEncoder;
import org.jboss.netty.bootstrap.ClientBootstrap;
+import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBufferOutputStream;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
+import org.jboss.netty.channel.ChannelFactory;
import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelFutureProgressListener;
import org.jboss.netty.channel.ChannelHandlerContext;
@@ -59,6 +61,9 @@ import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.group.ChannelGroup;
import org.jboss.netty.channel.group.DefaultChannelGroup;
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
+import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
+import org.jboss.netty.channel.socket.oio.OioClientSocketChannelFactory;
+import org.jboss.netty.channel.socket.oio.OioServerSocketChannelFactory;
import org.jboss.netty.handler.codec.http.CookieEncoder;
import org.jboss.netty.handler.codec.http.DefaultCookie;
import org.jboss.netty.handler.codec.http.DefaultHttpChunkTrailer;
@@ -140,7 +145,7 @@ public class NettyAsyncHttpProvider extends IdleStateHandler implements AsyncHtt
Executors.newCachedThreadPool(),
config.executorService());
plainBootstrap = new ClientBootstrap(socketChannelFactory);
- secureBootstrap = new ClientBootstrap(socketChannelFactory);
+ secureBootstrap = new ClientBootstrap(new OioClientSocketChannelFactory(config.executorService()));
this.config = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment