summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-03-02 07:24:11 +0000
committerNick Mathewson <nickm@torproject.org>2004-03-02 07:24:11 +0000
commita1e4c6dc853c4e2dba534e04045c1d15fd1f15b6 (patch)
treedf3e71864ca0a45bb96b47da2ace9019c10d9feb /src/or/connection.c
parentb961732246b8d6ecfead5ef20834626706f08e50 (diff)
downloadtor-a1e4c6dc853c4e2dba534e04045c1d15fd1f15b6.tar.gz
tor-a1e4c6dc853c4e2dba534e04045c1d15fd1f15b6.zip
Fix assertion failure spotted by arma.
Apparently, when a DNS failure was already cached, then when we tried to mark the exit connection as closed, we'd try to remove it from the pending queue anyway, and hit an assert. Now, we put failed-resolve connections in a separate state so that mark_for_close does the right thing. svn:r1196
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 700c056fbc..e81635a110 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -37,16 +37,18 @@ char *conn_state_to_string[][_CONN_TYPE_MAX+1] = {
{ "", /* exit, 0 */
"waiting for dest info", /* 1 */
"connecting", /* 2 */
- "open" }, /* 3 */
+ "open" /* 3 */
+ "resolve failed" }, /* 4 */
{ "ready" }, /* app listener, 0 */
{ "", /* 0 */
"", /* 1 */
"", /* 2 */
"", /* 3 */
- "awaiting dest info", /* app, 4 */
- "waiting for safe circuit", /* 5 */
- "waiting for connected", /* 6 */
- "open" }, /* 7 */
+ "", /* 4 */
+ "awaiting dest info", /* app, 5 */
+ "waiting for safe circuit", /* 6 */
+ "waiting for connected", /* 7 */
+ "open" }, /* 8 */
{ "ready" }, /* dir listener, 0 */
{ "", /* dir, 0 */
"connecting (fetch)", /* 1 */