mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
fix segfault (connecting to dirserver when network is down)
svn:r580
This commit is contained in:
parent
411a18e34c
commit
737760f071
2 changed files with 2 additions and 1 deletions
|
@ -577,7 +577,7 @@ static int connection_ap_handshake_socks_reply(connection_t *conn, char *reply,
|
|||
return 0;
|
||||
/* else fall through */
|
||||
case -1: /* resolve failed */
|
||||
log_fn(LOG_WARN,"Couldn't queue resolve request.");
|
||||
log_fn(LOG_WARN,"Resolve or connect failed (%s).", conn->address);
|
||||
connection_remove(n_stream);
|
||||
connection_free(n_stream);
|
||||
case 0: /* resolve added to pending list */
|
||||
|
|
|
@ -63,6 +63,7 @@ void directory_initiate_command(routerinfo_t *router, int command) {
|
|||
switch(connection_connect(conn, router->address, router->addr, router->dir_port)) {
|
||||
case -1:
|
||||
router_mark_as_down(conn->nickname); /* don't try him again */
|
||||
connection_remove(conn);
|
||||
connection_free(conn);
|
||||
return;
|
||||
case 0:
|
||||
|
|
Loading…
Add table
Reference in a new issue