ssb: Tweak idle scheduling even more, still. Fixes -t=bench.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 22m36s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 22m36s
This commit is contained in:
@ -908,7 +908,7 @@ static void _tf_ssb_connection_send_history_stream_callback(tf_ssb_connection_t*
|
||||
static void _tf_ssb_connection_send_history_stream(
|
||||
tf_ssb_connection_t* connection, int32_t request_number, const char* author, int64_t sequence, bool keys, bool live, bool end_request)
|
||||
{
|
||||
if (!tf_ssb_is_shutting_down(tf_ssb_connection_get_ssb(connection)))
|
||||
if (tf_ssb_connection_is_connected(connection) && !tf_ssb_is_shutting_down(tf_ssb_connection_get_ssb(connection)))
|
||||
{
|
||||
tf_ssb_connection_send_history_stream_t* async = tf_malloc(sizeof(tf_ssb_connection_send_history_stream_t));
|
||||
*async = (tf_ssb_connection_send_history_stream_t) {
|
||||
@ -919,7 +919,9 @@ static void _tf_ssb_connection_send_history_stream(
|
||||
.end_request = end_request,
|
||||
};
|
||||
snprintf(async->author, sizeof(async->author), "%s", author);
|
||||
tf_ssb_connection_schedule_idle(connection, author, _tf_ssb_connection_send_history_stream_callback, async);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user