From 6fcebd7a08821e8a168fdbc24537db6228f38848 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 19 Jul 2023 00:58:20 +0000 Subject: [PATCH] Nope, do the thing from the right thread. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4354 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/ssb.db.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ssb.db.c b/src/ssb.db.c index 4a767596..95295413 100644 --- a/src/ssb.db.c +++ b/src/ssb.db.c @@ -472,6 +472,10 @@ static void _tf_ssb_db_blob_store_after_work(uv_work_t* work, int status) blob_store_work_t* blob_work = work->data; tf_trace_t* trace = tf_ssb_get_trace(blob_work->ssb); tf_trace_begin(trace, "blob_store_after_work"); + if (status == 0 && *blob_work->id) + { + tf_ssb_notify_blob_stored(blob_work->ssb, blob_work->id); + } if (status != 0) { tf_printf("tf_ssb_db_blob_store_async -> uv_queue_work failed asynchronously: %s\n", uv_strerror(status)); @@ -550,7 +554,6 @@ bool tf_ssb_db_blob_store(tf_ssb_t* ssb, const uint8_t* blob, size_t size, char* if (rows) { - tf_ssb_notify_blob_stored(ssb, id); if (!out_new) { tf_printf("blob stored %s %zd => %d\n", id, size, result);