Skip to content

Commit

Permalink
adjust when we try to remove an introducer connection
Browse files Browse the repository at this point in the history
to only when we actually have more connections than we want
  • Loading branch information
zugz committed Sep 1, 2018
1 parent a22745f commit 14a58e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toxcore/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,7 @@ static void handle_message_packet_group(Group_Chats *g_c, uint32_t groupnumber,
return;
}

if (g->num_introducer_connections > 0 && count_close_connected(g) >= DESIRED_CLOSE_CONNECTIONS) {
if (g->num_introducer_connections > 0 && count_close_connected(g) > DESIRED_CLOSE_CONNECTIONS) {
for (uint32_t i = 0; i < MAX_GROUP_CONNECTIONS; ++i) {
if (g->close[i].type == GROUPCHAT_CLOSE_NONE
|| !(g->close[i].reasons & GROUPCHAT_CLOSE_REASON_INTRODUCER)
Expand Down

0 comments on commit 14a58e4

Please sign in to comment.