/* If conflux has no circuit to send on, the package window is 0. */
if (!circ) {
+ /* Bug #40842: Additional diagnostics for other potential cases */
+ if (!orig_circ->conflux->curr_leg) {
+ if (orig_circ->marked_for_close) {
+ log_warn(LD_BUG, "Conflux has no circuit to send on. "
+ "Circuit %p idx %d marked at line %s:%d",
+ orig_circ, orig_circ->global_circuitlist_idx,
+ orig_circ->marked_for_close_file,
+ orig_circ->marked_for_close);
+ } else {
+ log_warn(LD_BUG, "Conflux has no circuit to send on. "
+ "Circuit %p idx %d not marked for close.",
+ orig_circ, orig_circ->global_circuitlist_idx);
+ }
+ }
return 0;
}
if (send_circ) {
return true;
} else {
+ if (BUG(!cfx->in_full_teardown && !cfx->curr_leg)) {
+ log_fn(LOG_WARN,
+ LD_BUG, "Conflux has no current circuit to send on. ");
+ }
return false;
}
}
if (BUG(!circ)) {
log_warn(LD_BUG, "No circuit to send for conflux for relay command %d, "
"called from %s:%d", relay_command, filename, lineno);
+ conflux_log_set(LOG_WARN, orig_circ->conflux,
+ CIRCUIT_IS_ORIGIN(orig_circ));
circ = orig_circ;
} else {
/* Conflux circuits always send multiplexed relay commands to