Commit 737760f0 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

fix segfault (connecting to dirserver when network is down)


svn:r580
parent 411a18e3
......@@ -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:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment