mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed ghost peer problem.
This commit is contained in:
parent
74b13a9fcf
commit
82c60d6f34
|
@ -235,6 +235,14 @@ static int delpeer(Group_Chat *chat, int peernum)
|
|||
if ((uint32_t)peernum >= chat->numpeers)
|
||||
return -1;
|
||||
|
||||
uint32_t i;
|
||||
for (i = 0; i < GROUP_CLOSE_CONNECTIONS; ++i) { /* If peer is in close list, time it out forcefully. */
|
||||
if (id_equal(chat->close[i].client_id, chat->group[peernum].client_id)) {
|
||||
chat->close[i].last_recv = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Group_Peer *temp;
|
||||
--chat->numpeers;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user