From 9899c0c5e214706b9108d4278440d6e35f075a12 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Mon, 17 Mar 2025 12:29:30 -0400 Subject: [PATCH] ssb: Try to keep these stats from going negative. --- src/ssb.ebt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ssb.ebt.c b/src/ssb.ebt.c index 2ad56960..83d77d68 100644 --- a/src/ssb.ebt.c +++ b/src/ssb.ebt.c @@ -412,7 +412,7 @@ void tf_ssb_ebt_get_progress(tf_ssb_ebt_t* ebt, int* in_pending, int* in_total, { uv_mutex_lock(&ebt->mutex); _ebt_count_messages(ebt, in_pending, out_pending); - *in_total = ebt->max_in; - *out_total = ebt->max_out; + *in_total = tf_max(*in_pending, ebt->max_in); + *out_total = tf_max(*out_pending, ebt->max_out); uv_mutex_unlock(&ebt->mutex); }