--- jk_ajp13_worker.c.org       Wed Mar  7 18:43:42 2001
+++ jk_ajp13_worker.c   Wed Mar  7 18:56:28 2001
@@ -615,7 +615,17 @@
            while(1) {
             int rc = 0;
             
+            errno = 0;
                    if(!connection_tcp_get_message(p, msg, l)) {
+                /* 
+                 * If Tomcat shuts down, the above send() may succeed.
+                 * But we should get an error here: ECONNRESET. When
+                 * that's the case, set recoverable to true so that
+                 * we try one more time to do retries.
+                 */            
+                if ( errno == ECONNRESET ) 
+                  *is_recoverable_error = JK_TRUE;
+                
                        jk_log(l, JK_LOG_ERROR,
                                       "Error reading request\n");
                        return JK_FALSE;

