title: Netty.writeAndFlush with future is successfull to killed host
body: <p>We have a Netty (4.0.15) based Websocket server running on Ubuntu v10, and during resiliency testing we do:</p>
  
  <ol>
  <li>kill -9 server</li>
  <li>send some data from client</li>
  <li>expect <em>writeAndFlush</em> failure on client</li>
  </ol>
  
  <p>For some reasons <strong>sometimes</strong> we see:</p>
  
  <ol>
  <li><em>writeAndFlush</em>  success and then after</li>
  <li>java.io.IOException: Connection reset by peer</li>
  </ol>
  
  <p>So is it possible the <em>writeAndFlush</em> <strong>sometimes</strong> completes successfully even if the server is gone, whilst other times it fails?</p>
  
  <p>Maybe this occurs because of the schedule of the OS socket clean-up mechanism for killed processes?</p>
  
  <p>Client test code:</p>
  
  <pre><code>    channel.writeAndFlush(new TextWebSocketFrame("blah blah")).addListeners(
      &lt;snip&gt;
              public void operationComplete(ChannelFuture future) {
                  assert future.isSuccess() == false;  &lt;-- sometimes this is not triggered
              }
      &lt;/snip&gt;
  </code></pre>
  
  <p>Thanks for any ideas,</p>