[or-cvs] avoid a sigpipe from a race: if we get the end right after

Roger Dingledine arma at seul.org
Tue Dec 7 15:31:56 UTC 2004


Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	relay.c 
Log Message:
avoid a sigpipe from a race: if we get the end right after
the app has hung up on us, we shouldn't hold-open-until-flush.


Index: relay.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/relay.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- relay.c	29 Nov 2004 22:25:30 -0000	1.29
+++ relay.c	7 Dec 2004 15:31:54 -0000	1.30
@@ -739,8 +739,8 @@
         /* 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:



More information about the tor-commits mailing list