diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-03-11 10:33:19 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-02-07 09:48:13 -0500 |
commit | 650c03127a877eb0de1cfad8afa5cb3d8474a956 (patch) | |
tree | 03b46d4fa3b427d9e395136f746497ff79ce454e | |
parent | e4a42242eaa2547adf0ad66ccc577f31817b86db (diff) | |
download | tor-650c03127a877eb0de1cfad8afa5cb3d8474a956.tar.gz tor-650c03127a877eb0de1cfad8afa5cb3d8474a956.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.
-rw-r--r-- | src/or/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index bd23141b97..a2b032dbcc 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -517,6 +517,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) { @@ -542,6 +548,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) { |