diff --git a/src/ssb.connections.c b/src/ssb.connections.c index 1e99f97f..27f5f6d6 100644 --- a/src/ssb.connections.c +++ b/src/ssb.connections.c @@ -21,7 +21,7 @@ typedef struct _tf_ssb_connections_t static void _tf_ssb_connections_changed_callback(tf_ssb_t* ssb, tf_ssb_change_t change, tf_ssb_connection_t* connection, void* user_data) { - if (!connection) + if (!connection || tf_ssb_is_shutting_down(ssb)) { return; } diff --git a/src/task.c b/src/task.c index 5eccbdfa..515b16a8 100644 --- a/src/task.c +++ b/src/task.c @@ -1869,6 +1869,7 @@ void tf_task_destroy(tf_task_t* task) { JSValue global = JS_GetGlobalObject(task->_context); JS_SetPropertyStr(task->_context, global, "httpd", JS_UNDEFINED); + JS_SetPropertyStr(task->_context, global, "gProcesses", JS_NewObject(task->_context)); JS_FreeValue(task->_context, global); }