/**
  * This method is used to write the zero length chunk. Writing the zero length chunk tells the
  * client that the response has been fully sent, and the next sequence of bytes from the HTTP
  * pipeline is the start of the next response. This will signal to the server kernel that the next
  * request is read to read.
  */
 private void finish() throws IOException {
   try {
     sender.send(zero);
     monitor.ready(sender);
   } catch (Exception cause) {
     if (sender != null) {
       monitor.close(sender);
     }
     throw new ProducerException("Error flushing response", cause);
   }
 }