summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/connection_edge.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 496fe21b11..8b2f635b23 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -799,6 +799,12 @@ connection_ap_attach_pending(int retry)
SMARTLIST_DEL_CURRENT(pending_entry_connections, entry_conn);
continue;
}
+ if (conn->magic != ENTRY_CONNECTION_MAGIC) {
+ log_warn(LD_BUG, "%p has impossible magic value %u",
+ entry_conn, (unsigned)conn->magic);
+ SMARTLIST_DEL_CURRENT(pending_entry_connections, entry_conn);
+ continue;
+ }
if (conn->state != AP_CONN_STATE_CIRCUIT_WAIT) {
log_warn(LD_BUG, "%p is no longer in circuit_wait. Its current state "
"is %s. Why is it on pending_entry_connections?",