]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
avoid a sigpipe from a race: if we get the end right after
authorRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 15:31:54 +0000 (15:31 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 15:31:54 +0000 (15:31 +0000)
the app has hung up on us, we shouldn't hold-open-until-flush.

svn:r3109

src/or/relay.c

index 39b6369939402224817847783a32f064a37fc05b..948b030df03ed3615c29e340c677d4cde78e9f4a 100644 (file)
@@ -739,8 +739,8 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ,
         /* only mark it if not already marked. it's possible to
          * get the 'end' right around when the client hangs up on us. */
         connection_mark_for_close(conn);
+        conn->hold_open_until_flushed = 1;
       }
-      conn->hold_open_until_flushed = 1;
 #endif
       return 0;
     case RELAY_COMMAND_EXTEND: