diff --git a/ChangeLog b/ChangeLog index 5891698433..494f56bdb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ Changes in version 0.1.2.18 - 2007-??-?? connections: they specify their chosen rendezvous point by identity digest rather than by (potentially ambiguous) nickname. These changes could speed up hidden service connections dramatically. + - If a connection is shut down abruptly because of something that + happened inside connection_flushed_some(), do not call + connection_finished_flushing(). Should fix bug 451. Bugfix on + 0.1.2.7-alpha. o Minor bugfixes: - Don't try to access (or alter) the state file when running diff --git a/doc/TODO.012 b/doc/TODO.012 index 6126f3e966..9a03d4ba52 100644 --- a/doc/TODO.012 +++ b/doc/TODO.012 @@ -4,7 +4,7 @@ description of the patch.) Backport items for 0.1.2: o r11166: Don't believe future dates from the state file. o r11828+: Detect bad sa_family from accept(). -N - r11882: Avoid crash-bug 451. + o r11882: Avoid crash-bug 451. N - r11886: Consider family as well as identity when cannibalizing circuits. diff --git a/src/or/connection.c b/src/or/connection.c index e92345aeb3..e7c2365595 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -2289,6 +2289,9 @@ connection_finished_flushing(connection_t *conn) { tor_assert(conn); + if (conn->s < 0 || !conn->write_event) + return 0; + // log_fn(LOG_DEBUG,"entered. Socket %u.", conn->s); switch (conn->type) {