Fixed possible issue.

This commit is contained in:
irungentoo 2013-11-02 23:14:56 -04:00
parent 52d1c9a4d9
commit 41e083c173

View File

@ -832,8 +832,7 @@ static int handle_SYNC2(Lossless_UDP *ludp, int connection_id, uint8_t counter,
{
Connection *connection = &tox_array_get(&ludp->connections, connection_id, Connection);
if (recv_packetnum == connection->orecv_packetnum) {
/* && sent_packetnum == connection->osent_packetnum) */
if (recv_packetnum == connection->orecv_packetnum && sent_packetnum == connection->osent_packetnum) {
connection->status = LUDP_ESTABLISHED;
connection->recv_counter = counter;
++connection->send_counter;