Fixed possible bug.

This commit is contained in:
irungentoo 2013-09-28 17:19:32 -04:00
parent abd4278fc4
commit 8adb34e6a9

View File

@ -1222,14 +1222,14 @@ void doFriends(Messenger *m)
set_friend_status(m, i, FRIEND_CONFIRMED);
}
break;
}
if (m->friendlist[i].ping_lastrecv + FRIEND_CONNECTION_TIMEOUT < temp_time) {
/* If we stopped recieving ping packets, kill it. */
crypto_kill(m->net_crypto, m->friendlist[i].crypt_connection_id);
m->friendlist[i].crypt_connection_id = -1;
set_friend_status(m, i, FRIEND_CONFIRMED);
}
if (m->friendlist[i].ping_lastrecv + FRIEND_CONNECTION_TIMEOUT < temp_time) {
/* If we stopped recieving ping packets, kill it. */
crypto_kill(m->net_crypto, m->friendlist[i].crypt_connection_id);
m->friendlist[i].crypt_connection_id = -1;
set_friend_status(m, i, FRIEND_CONFIRMED);
break;
}
}
}