From 04befb21be0327996eb3597cb91d5bdd00066974 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 15 Jan 2023 23:59:47 +0100 Subject: [PATCH] fix: activity timer was not being reset --- ngc_ft1.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ngc_ft1.cpp b/ngc_ft1.cpp index 28f4f02..a59d250 100644 --- a/ngc_ft1.cpp +++ b/ngc_ft1.cpp @@ -262,7 +262,7 @@ void NGC_FT1_iterate(Tox *tox, NGC_FT1* ngc_ft1_ctx) { while (tf.ssb.size() < 1) { std::vector new_data; - size_t chunk_size = std::min(10u, tf.file_size - tf.file_size_current); + size_t chunk_size = std::min(400u, tf.file_size - tf.file_size_current); if (chunk_size == 0) { // TODO: set to finishing? break; // we done @@ -811,6 +811,8 @@ static void _handle_FT1_DATA_ACK( return; } + transfer.time_since_activity = 0.f; + while (curser < length) { uint16_t seq_id = data[curser++]; seq_id |= data[curser++] << (1*8);