diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2016-10-11 10:08:25 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2016-10-11 10:08:38 +0100 |
commit | 7f3912b19cbc8a3865d5d24cde179af76d324a72 (patch) | |
tree | c917cf3e78ca95c39b571149e4fdf89888917a81 | |
parent | 1cc30835b99c01d4925c441e339cdfb955b9fde1 (diff) |
Avoid bytes_from_first_read to be set again to 0 while transfering
This could potentially sligthly change the speed while
transfering data.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r-- | tun.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -580,7 +580,7 @@ handle_tun(void) /* reduce values avoiding possible overflows and * increasing precision (due to floating point * numbers) */ - while (curr_time >= flow->first_received_at + 1000000u && flow->bytes_from_first_read >= rate_bytes) { + while (curr_time >= flow->first_received_at + 1000000u && flow->bytes_from_first_read > rate_bytes) { flow->first_received_at += 1000000u; flow->bytes_from_first_read -= rate_bytes; } |