From e96d22e914e8b7a81cc472579df9fdb92ab48bb2 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 18 Mar 2008 19:00:12 +0000 Subject: [PATCH] r18941@catbus: nickm | 2008-03-18 14:59:43 -0400 Likely fix for bug 632: do not call start_reading on a placeholder connection. svn:r14109 --- ChangeLog | 5 +++++ src/or/relay.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3dc25f99e8..a788ecaee1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ Changes in version 0.2.1.1-alpha - 2008-??-?? + o Major bugfixes: + - Fix assertion failure that could occur when a blocked circuit became + unblocked, and it had pending client DNS requests. Bugfix on + 0.2.0.1-alpha. Fixes bug 632. + o Minor bugfixes: - Stop giving double-close warn when we reject an address for client DNS. - On Windows, correctly detect errors when listing the contents of a diff --git a/src/or/relay.c b/src/or/relay.c index 0d863cd972..db7d1a3d77 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -1813,6 +1813,12 @@ set_streams_blocked_on_circ(circuit_t *circ, or_connection_t *orconn, connection_t *conn = TO_CONN(edge); conn->edge_blocked_on_circ = block; + if (!conn->read_event) { + /* This connection is a placeholder for something; probably a DNS + * request. It can't actually stop or start reading.*/ + continue; + } + if (block) { if (connection_is_reading(conn)) connection_stop_reading(conn);