Trying to fix socket lifetime issues.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3886 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-06-02 10:58:22 +00:00
parent 58f459fb3b
commit 5622db92a7
3 changed files with 105 additions and 80 deletions

View File

@ -732,6 +732,8 @@ static JSValue _tf_task_getStats(JSContext* context, JSValueConst this_val, int
}
JS_SetPropertyStr(context, result, "sqlite3_memory_percent", JS_NewFloat64(context, 100.0f * sqlite3_memory_used() / total_memory));
JS_SetPropertyStr(context, result, "socket_count", JS_NewInt32(context, tf_socket_get_count()));
JS_SetPropertyStr(context, result, "socket_open_count", JS_NewInt32(context, tf_socket_get_open_count()));
if (task->_ssb)
{