You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2005/09/25 20:08:33 UTC

svn commit: r291454 - /httpd/httpd/trunk/server/connection.c

Author: jorton
Date: Sun Sep 25 11:08:29 2005
New Revision: 291454

URL: http://svn.apache.org/viewcvs?rev=291454&view=rev
Log:
* server/connection.c (ap_lingering_close): Cleanup; no functional change.

Modified:
    httpd/httpd/trunk/server/connection.c

Modified: httpd/httpd/trunk/server/connection.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/connection.c?rev=291454&r1=291453&r2=291454&view=diff
==============================================================================
--- httpd/httpd/trunk/server/connection.c (original)
+++ httpd/httpd/trunk/server/connection.c Sun Sep 25 11:08:29 2005
@@ -98,9 +98,7 @@
 AP_DECLARE(void) ap_lingering_close(conn_rec *c)
 {
     char dummybuf[512];
-    apr_size_t nbytes = sizeof(dummybuf);
-    apr_status_t rc;
-    apr_int32_t timeout;
+    apr_size_t nbytes;
     apr_time_t timeup = 0;
     apr_socket_t *csd = ap_get_module_config(c->conn_config, &core_module);
 
@@ -143,8 +141,7 @@
      * does not send any data within 2 seconds (a value pulled from
      * Apache 1.3 which seems to work well), give up.
      */
-    timeout = apr_time_from_sec(SECONDS_TO_LINGER);
-    apr_socket_timeout_set(csd, timeout);
+    apr_socket_timeout_set(csd, apr_time_from_sec(SECONDS_TO_LINGER));
     apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
 
     /* The common path here is that the initial apr_socket_recv() call
@@ -153,8 +150,7 @@
 
     do {
         nbytes = sizeof(dummybuf);
-        rc = apr_socket_recv(csd, dummybuf, &nbytes);
-        if (rc != APR_SUCCESS || nbytes == 0)
+        if (apr_socket_recv(csd, dummybuf, &nbytes) || nbytes == 0)
             break;
 
         if (timeup == 0) {