summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-05-05 00:59:42 +0000
committerRoger Dingledine <arma@torproject.org>2004-05-05 00:59:42 +0000
commit608c15682049ee375f81655625b9f85d6a600a1a (patch)
treeeef3cb9c1d379acfde6e897eb4fd925bf2045073
parentefdb356a81c58e2f6a0715acf55c0c9a5ea5d2e6 (diff)
downloadtor-608c15682049ee375f81655625b9f85d6a600a1a.tar.gz
tor-608c15682049ee375f81655625b9f85d6a600a1a.zip
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. svn:r1786
-rw-r--r--src/or/main.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/or/main.c b/src/or/main.c
index cc3789e85c..122af87bb9 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -445,16 +445,12 @@ static void run_scheduled_events(time_t now) {
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) {