diff --git a/src/ssb.c b/src/ssb.c index c6352d40..040bf16a 100644 --- a/src/ssb.c +++ b/src/ssb.c @@ -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) { - 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) {