Commit 608c1568 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

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
parent efdb356a
...@@ -445,16 +445,12 @@ static void run_scheduled_events(time_t now) { ...@@ -445,16 +445,12 @@ static void run_scheduled_events(time_t now) {
last_uploaded_services = now; last_uploaded_services = now;
} }
#if 0 /* 6. and blow away any connections that need to die. have to do this now,
/* 6. and blow away any connections that need to die. can't do this later * because if we marked a conn for close and left its socket -1, then
* because we might open up a circuit and not realize we're about to cull * we'll pass it to poll/select and bad things will happen.
* 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
*/ */
for(i=0;i<nfds;i++) for(i=0;i<nfds;i++)
conn_close_if_marked(i); conn_close_if_marked(i);
#endif
} }
static int prepare_for_poll(void) { static int prepare_for_poll(void) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment