summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-03-11 10:33:19 -0500
committerNick Mathewson <nickm@torproject.org>2016-03-11 10:33:19 -0500
commite79da62645925f3286deb21740bbe91de9dafacc (patch)
treec11d33a6845fa04dfd55726c4f42e970a050ca58 /src/or/main.c
parent17cfdb358cae63477a120182784599dae0538cd7 (diff)
downloadtor-e79da62645925f3286deb21740bbe91de9dafacc.tar.gz
tor-e79da62645925f3286deb21740bbe91de9dafacc.zip
If we start/stop reading on a dnsserv connection, don't assert.
Fixes bug 16248. Patch from cypherpunks. Bugfix on 0.2.0.1-alpha.
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 534a6acc51..3fb80e1759 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -578,6 +578,12 @@ connection_stop_reading,(connection_t *conn))
return;
});
+ /* if dummy conn then no socket and no event, nothing to do here */
+ if (conn->type == CONN_TYPE_AP && TO_EDGE_CONN(conn)->is_dns_request) {
+ tor_assert(!conn->read_event);
+ return;
+ }
+
tor_assert(conn->read_event);
if (conn->linked) {
@@ -603,6 +609,12 @@ connection_start_reading,(connection_t *conn))
return;
});
+ /* if dummy conn then no socket and no event, nothing to do here */
+ if (conn->type == CONN_TYPE_AP && TO_EDGE_CONN(conn)->is_dns_request) {
+ tor_assert(!conn->read_event);
+ return;
+ }
+
tor_assert(conn->read_event);
if (conn->linked) {