summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-06-11 09:55:47 -0400
committerNick Mathewson <nickm@torproject.org>2015-06-11 09:55:47 -0400
commitaab7d666cd51fdccdb735f7fa2c59f93d0c450e9 (patch)
tree507a8b1e8630cd8695d70d7b9818f94bda9da465 /src/or/circuituse.c
parent09895d48c62404ebe60522e24e22e880c4472c65 (diff)
downloadtor-aab7d666cd51fdccdb735f7fa2c59f93d0c450e9.tar.gz
tor-aab7d666cd51fdccdb735f7fa2c59f93d0c450e9.zip
Add a log message to try to track down #16013
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index a429a7d053..28c70ad22c 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -1843,6 +1843,12 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn,
tor_assert(conn);
tor_assert(circp);
+ if (ENTRY_TO_CONN(conn)->state != AP_CONN_STATE_CIRCUIT_WAIT) {
+ connection_t *c = ENTRY_TO_CONN(conn);
+ log_err(LD_BUG, "Connection state mismatch: wanted "
+ "AP_CONN_STATE_CIRCUIT_WAIT, but got %d (%s)",
+ c->state, conn_state_to_string(c->type, c->state));
+ }
tor_assert(ENTRY_TO_CONN(conn)->state == AP_CONN_STATE_CIRCUIT_WAIT);
check_exit_policy =
conn->socks_request->command == SOCKS_COMMAND_CONNECT &&