ssb: Allow a concurrent connection if the other one is a connection in the process of closing.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled

This commit is contained in:
Cory McWilliams 2025-01-20 16:49:21 -05:00
parent 19dbe354e7
commit fba465dd62

View File

@ -1408,7 +1408,7 @@ static bool _tf_ssb_is_already_connected(tf_ssb_t* ssb, uint8_t* id, tf_ssb_conn
{ {
for (tf_ssb_connection_t* connection = ssb->connections; connection; connection = connection->next) for (tf_ssb_connection_t* connection = ssb->connections; connection; connection = connection->next)
{ {
if (!ignore_connection || connection != ignore_connection) if ((!ignore_connection || connection != ignore_connection) && !connection->is_closing)
{ {
if (memcmp(connection->serverpub, id, k_id_bin_len) == 0) if (memcmp(connection->serverpub, id, k_id_bin_len) == 0)
{ {