mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Cosmetic patch for arma's fix for The Bug: Don't set the state to
RESOLVEFAILED if the resolve didn't fail; set it to CONNECTING instead. svn:r1590
This commit is contained in:
parent
da7bd22a0e
commit
c024745bd4
@ -378,14 +378,16 @@ static void dns_found_answer(char *address, uint32_t addr, char outcome) {
|
|||||||
assert_connection_ok(pend->conn,time(NULL));
|
assert_connection_ok(pend->conn,time(NULL));
|
||||||
pend->conn->addr = resolve->addr;
|
pend->conn->addr = resolve->addr;
|
||||||
|
|
||||||
/* prevent double-remove. (this may get changed below.) */
|
|
||||||
pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED;
|
|
||||||
|
|
||||||
if(resolve->state == CACHE_STATE_FAILED) {
|
if(resolve->state == CACHE_STATE_FAILED) {
|
||||||
pendconn = pend->conn; /* don't pass complex things to the
|
pendconn = pend->conn; /* don't pass complex things to the
|
||||||
connection_mark_for_close macro */
|
connection_mark_for_close macro */
|
||||||
|
/* prevent double-remove. */
|
||||||
|
pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED;
|
||||||
connection_mark_for_close(pendconn, END_STREAM_REASON_RESOLVEFAILED);
|
connection_mark_for_close(pendconn, END_STREAM_REASON_RESOLVEFAILED);
|
||||||
} else {
|
} else {
|
||||||
|
/* prevent double-remove. */
|
||||||
|
pend->conn->state = EXIT_CONN_STATE_CONNECTING;
|
||||||
connection_exit_connect(pend->conn);
|
connection_exit_connect(pend->conn);
|
||||||
}
|
}
|
||||||
resolve->pending_connections = pend->next;
|
resolve->pending_connections = pend->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user