Fix some shutdown hangs/leaks.
This commit is contained in:
parent
c7d3e602cb
commit
9497d7cf64
@ -648,7 +648,10 @@ typedef struct _blob_store_work_t
|
||||
static void _tf_ssb_db_blob_store_work(tf_ssb_t* ssb, void* user_data)
|
||||
{
|
||||
blob_store_work_t* blob_work = user_data;
|
||||
tf_ssb_db_blob_store(ssb, blob_work->blob, blob_work->size, blob_work->id, sizeof(blob_work->id), &blob_work->is_new);
|
||||
if (!tf_ssb_is_shutting_down(ssb))
|
||||
{
|
||||
tf_ssb_db_blob_store(ssb, blob_work->blob, blob_work->size, blob_work->id, sizeof(blob_work->id), &blob_work->is_new);
|
||||
}
|
||||
}
|
||||
|
||||
static void _tf_ssb_db_blob_store_after_work(tf_ssb_t* ssb, int status, void* user_data)
|
||||
|
@ -776,6 +776,10 @@ static void _tf_ssb_connection_send_history_stream_callback(tf_ssb_connection_t*
|
||||
{
|
||||
tf_ssb_connection_run_work(connection, _tf_ssb_connection_send_history_stream_work, _tf_ssb_connection_send_history_stream_after_work, user_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
_tf_ssb_connection_send_history_stream_after_work(connection, -1, user_data);
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user