Compare commits

..

2 Commits

Author SHA1 Message Date
9899c0c5e2 ssb: Try to keep these stats from going negative.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m12s
2025-03-17 12:29:30 -04:00
c50de0b0f0 ssb: Testing a theory that message sends are piling up. 2025-03-17 12:27:16 -04:00
2 changed files with 3 additions and 5 deletions

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

View File

@ -1009,9 +1009,7 @@ static void _tf_ssb_connection_send_history_stream(
.end_request = end_request,
};
snprintf(async->author, sizeof(async->author), "%s", author);
char key[128];
snprintf(key, sizeof(key), "%s:%" PRId64, author, sequence);
tf_ssb_connection_schedule_idle(connection, key, _tf_ssb_connection_send_history_stream_callback, async);
tf_ssb_connection_schedule_idle(connection, author, _tf_ssb_connection_send_history_stream_callback, async);
}
}