[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] must close marked connections at the end of run_scheduled_e...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] must close marked connections at the end of run_scheduled_e...
- From: arma@seul.org (Roger Dingledine)
- Date: Tue, 4 May 2004 20:59:44 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 04 May 2004 21:00:01 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
main.c
Log Message:
must close marked connections at the end of run_scheduled_events.
otherwise they might have a socket -1, and if we leave them around
they'll muck up poll/select.
i think this was the cause of our win32 and os x fakepoll crashes,
and probably would cause other errors down the road.
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -d -r1.253 -r1.254
--- main.c 2 May 2004 20:18:21 -0000 1.253
+++ main.c 5 May 2004 00:59:42 -0000 1.254
@@ -445,16 +445,12 @@
last_uploaded_services = now;
}
-#if 0
- /* 6. and blow away any connections that need to die. can't do this later
- * because we might open up a circuit and not realize we're about to cull
- * the connection it's running over.
- * XXX we can remove this step once we audit circuit-building to make sure
- * it doesn't pick a marked-for-close conn. -RD
+ /* 6. and blow away any connections that need to die. have to do this now,
+ * because if we marked a conn for close and left its socket -1, then
+ * we'll pass it to poll/select and bad things will happen.
*/
for(i=0;i<nfds;i++)
conn_close_if_marked(i);
-#endif
}
static int prepare_for_poll(void) {