ssb: This seems like it would explain replication stalls.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m18s

This commit is contained in:
Cory McWilliams 2025-03-19 06:46:34 -04:00
parent e92c439724
commit 0bcb033349
2 changed files with 2 additions and 2 deletions

View File

@ -4580,7 +4580,7 @@ void tf_ssb_connection_adjust_read_backpressure(tf_ssb_connection_t* connection,
void tf_ssb_connection_adjust_write_count(tf_ssb_connection_t* connection, int delta)
{
connection->active_write_count += delta;
if (!connection->is_closing)
if (!connection->is_closing && connection->active_write_count == 0)
{
uv_async_send(&connection->scheduled_async);
}

View File

@ -984,9 +984,9 @@ static void _tf_ssb_connection_send_history_stream_after_work(tf_ssb_connection_
static void _tf_ssb_connection_send_history_stream_callback(tf_ssb_connection_t* connection, bool skip, void* user_data)
{
tf_ssb_connection_adjust_write_count(connection, 1);
if (!skip && tf_ssb_connection_is_connected(connection) && !tf_ssb_is_shutting_down(tf_ssb_connection_get_ssb(connection)))
{
tf_ssb_connection_adjust_write_count(connection, 1);
tf_ssb_connection_run_work(connection, _tf_ssb_connection_send_history_stream_work, _tf_ssb_connection_send_history_stream_after_work, user_data);
}
else