title: Netty proxy server is returning Connection reset by peer
body: <p>I cloned the netty repo and run the proxy example</p>
  
  <p><a href="https://github.com/netty/netty/tree/4.1/example/src/main/java/io/netty/example/proxy" rel="nofollow noreferrer">https://github.com/netty/netty/tree/4.1/example/src/main/java/io/netty/example/proxy</a></p>
  
  <p>The server started fine.
  when I hit <code>localhost:8443</code> on my browser, 
  I get the following error</p>
  
  <pre><code>java.io.IOException: Connection reset by peer
      at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
      at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
      at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
      at sun.nio.ch.IOUtil.read(IOUtil.java:192)
      at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
      at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
      at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1125)
      at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
      at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
      at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:682)
      at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:617)
      at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:534)
      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
      at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906)
      at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
      at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
      at java.lang.Thread.run(Thread.java:748)
  </code></pre>
  
  <p>Is the example outdated or do I need to set something else?</p>
  
  <p>Thanks</p>