diff options
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 91f9b4d20..0b25f8927 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -867,15 +867,13 @@ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) { return 0; case -1: /* resolve failed */ log_fn(LOG_INFO,"Resolve failed (%s).", n_stream->address); + /* Set the state so that we don't try to remove n_stream from a DNS + * pending list. */ + n_stream->state = EXIT_CONN_STATE_RESOLVEFAILED; connection_mark_for_close(n_stream, END_STREAM_REASON_RESOLVEFAILED); -/* XXX BUG: we're in state RESOLVING here, but we haven't been added to the - * 'pending' list, because the dns lookup was already cached as failed. - * But the mark_for_close will try to remove us from the pending list, - * and we'll trigger an assert (dns.c line 209). - * Should we add another EXIT_CONN state? Should we put an exception - * here? Or there? - */ - /* case 0, resolve added to pending list */ + break; + case 0: /* resolve added to pending list */ + ; } return 0; } |