ssb: Try to keep these stats from going negative.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m12s

This commit is contained in:
Cory McWilliams 2025-03-17 12:29:30 -04:00
parent c50de0b0f0
commit 9899c0c5e2

View File

@ -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);
}