Skip to content
Snippets Groups Projects
Commit e79da626 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

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.
parent 17cfdb35
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment