summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/net_crypto.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index d50ac4b6..811dbf1a 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -2298,7 +2298,10 @@ static void send_crypto_packets(Net_Crypto *c)
2298 int ret = send_requested_packets(c, i, conn->packets_left); 2298 int ret = send_requested_packets(c, i, conn->packets_left);
2299 2299
2300 if (ret != -1) { 2300 if (ret != -1) {
2301 conn->sending = CONN_SENDING_VALUE; 2301 if (ret != 0) {
2302 conn->sending = CONN_SENDING_VALUE;
2303 }
2304
2302 conn->packets_resent += ret; 2305 conn->packets_resent += ret;
2303 conn->packets_left -= ret; 2306 conn->packets_left -= ret;
2304 } 2307 }