ben         99/07/23 11:14:45

  Modified:    mpm/src/main http_connection.c
  Log:
  Actually, we should always close the connection when it is finished.
  
  Revision  Changes    Path
  1.12      +22 -22    apache-2.0/mpm/src/main/http_connection.c
  
  Index: http_connection.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_connection.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- http_connection.c 1999/07/22 19:17:21     1.11
  +++ http_connection.c 1999/07/23 18:14:44     1.12
  @@ -197,6 +197,28 @@
       ap_run_pre_connection(c);
   
       ap_run_process_connection(c);
  +
  +    /*
  +     * Close the connection, being careful to send out whatever is still
  +     * in our buffers.  If possible, try to avoid a hard close until the
  +     * client has ACKed our FIN and/or has stopped sending us data.
  +     */
  +
  +#ifdef NO_LINGCLOSE
  +    ap_bclose(c->client);    /* just close it */
  +#else
  +    if (r && r->connection
  +     && !r->connection->aborted
  +     && r->connection->client
  +     && (r->connection->client->fd >= 0)) {
  +
  +     lingering_close(r);
  +    }
  +    else {
  +     ap_bsetflag(c->client, B_EOUT, 1);
  +     ap_bclose(c->client);
  +    }
  +#endif
   }
   
   int ap_process_http_connection(conn_rec *c)
  @@ -226,28 +248,6 @@
            return OK;
        }
       }
  -
  -    /*
  -     * Close the connection, being careful to send out whatever is still
  -     * in our buffers.  If possible, try to avoid a hard close until the
  -     * client has ACKed our FIN and/or has stopped sending us data.
  -     */
  -
  -#ifdef NO_LINGCLOSE
  -    ap_bclose(c->client);    /* just close it */
  -#else
  -    if (r && r->connection
  -     && !r->connection->aborted
  -     && r->connection->client
  -     && (r->connection->client->fd >= 0)) {
  -
  -     lingering_close(r);
  -    }
  -    else {
  -     ap_bsetflag(c->client, B_EOUT, 1);
  -     ap_bclose(c->client);
  -    }
  -#endif
   
       return OK;
   }
  
  
  

Reply via email to