diff --git a/src/main.c b/src/main.c index 9c31620d..92727e5b 100644 --- a/src/main.c +++ b/src/main.c @@ -357,7 +357,10 @@ static int _tf_run_task(const tf_run_args_t* args, int index) tf_task_set_db_path(task, db_path); tf_task_set_secrets_path(task, secrets_path); tf_task_activate(task); - tf_ssb_import(tf_task_get_ssb(task), "core", "apps"); + if (args->ssb_port) + { + tf_ssb_import(tf_task_get_ssb(task), "core", "apps"); + } if (tf_task_execute(task, args->script)) { tf_task_run(task); diff --git a/src/socket.js.c b/src/socket.js.c index 632adbd1..5b4ff9aa 100644 --- a/src/socket.js.c +++ b/src/socket.js.c @@ -758,6 +758,7 @@ void _socket_onRead(uv_stream_t* stream, ssize_t readSize, const uv_buf_t* buffe tf_util_report_error(context, result); JS_FreeValue(context, result); } + _socket_close_internal(socket); break; } else