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) int ret = send_requested_packets(c, i, conn->packets_left); if (ret != -1) { - conn->sending = CONN_SENDING_VALUE; + if (ret != 0) { + conn->sending = CONN_SENDING_VALUE; + } + conn->packets_resent += ret; conn->packets_left -= ret; }