diff options
author | irungentoo <irungentoo@gmail.com> | 2014-06-05 19:16:03 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-06-05 19:16:03 -0400 |
commit | a4ac1497a5ab4fbb13f998c9fffb14c07d4b380a (patch) | |
tree | 3cf43568c225a0ebc9b2717f267db832e7b07d02 /toxcore/net_crypto.c | |
parent | 0b3980fc73b8d3d976cc2791a73c80c080762cd7 (diff) |
Fixed regression that made packet_send_rate increase even when
no data was transmitted.
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 5 |
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 | } |