From 4a3bed3e850af7aee70bc37bb75ddc913b7a56c0 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Tue, 24 Sep 2013 18:15:15 -0400 Subject: [PATCH] Possibly fixed the weird disconnecting/reconnecting bug. --- toxcore/Lossless_UDP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toxcore/Lossless_UDP.c b/toxcore/Lossless_UDP.c index feae6767..8d447534 100644 --- a/toxcore/Lossless_UDP.c +++ b/toxcore/Lossless_UDP.c @@ -858,7 +858,7 @@ static int handle_SYNC3(Lossless_UDP *ludp, int connection_id, uint8_t counter, /* Packet valid. */ if (comp_1 <= connection->sendbuffer_length && comp_2 <= MAX_QUEUE_NUM && - comp_counter == 1) { + comp_counter != 0 && comp_counter < 4) { connection->orecv_packetnum = recv_packetnum; connection->osent_packetnum = sent_packetnum; connection->successful_sent = recv_packetnum;