]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
don't process marked-for-close conns further.
authorRoger Dingledine <arma@torproject.org>
Wed, 24 Nov 2004 06:41:58 +0000 (06:41 +0000)
committerRoger Dingledine <arma@torproject.org>
Wed, 24 Nov 2004 06:41:58 +0000 (06:41 +0000)
(fix assert trigger -- if we're lucky.)

svn:r2975

src/or/connection.c

index 3a168d36877ccf15794c514dd9cf12c32c20045f..5c21c7952c7e3bf22b40090a6330d1f2880e3e4f 100644 (file)
@@ -850,14 +850,19 @@ loop_again:
     if (connection_process_inbuf(conn, 0) < 0) {
       return -1;
     }
-    if (connection_is_reading(conn) && !conn->inbuf_reached_eof)
+    if (!conn->marked_for_close &&
+        connection_is_reading(conn) &&
+        !conn->inbuf_reached_eof)
       goto loop_again; /* try reading again, in case more is here now */
   }
   /* one last try, packaging partial cells and all. */
-  if (connection_process_inbuf(conn, 1) < 0) {
+  if (!conn->marked_for_close &&
+      connection_process_inbuf(conn, 1) < 0) {
     return -1;
   }
-  if (conn->inbuf_reached_eof && connection_reached_eof(conn) < 0) {
+  if (!conn->marked_for_close &&
+      conn->inbuf_reached_eof &&
+      connection_reached_eof(conn) < 0) {
     return -1;
   }
   return 0;