Check if connection is excess in connection_dir_finished_flushing
In legacy/trac#4483 (moved), I added a check like the one below to every transition from DIR_CONN_STATE_CONNECTING to another state, but I missed connection_dir_finished_flushing:
/* Close this connection if there's another consensus connection
* downloading (during bootstrap), or connecting (after bootstrap). */
if (connection_dir_close_consensus_conn_if_extra(conn)) {
return;
}
It would be good to to fix this in 0.2.8, because otherwise clients could end up requesting multiple consensuses, which is expensive for relays and for the network.