Added some storage+debugging to track what happens before we disconnect. Maybe I'll learn something.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4146 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-01-22 20:37:19 +00:00
parent 0a6b842179
commit ab75ec07f8
4 changed files with 135 additions and 0 deletions

View File

@ -826,6 +826,12 @@ static JSValue _tf_task_getDebug(JSContext* context, JSValueConst this_val, int
return result;
}
static JSValue _tf_task_disconnectionsDebug(JSContext* context, JSValueConst this_val, int argc, JSValueConst* argv)
{
tf_task_t* task = JS_GetContextOpaque(context);
return tf_ssb_get_disconnection_debug(task->_ssb, context);
}
static JSValue _tf_task_getFile(JSContext* context, JSValueConst this_val, int argc, JSValueConst* argv)
{
tf_task_t* task = JS_GetContextOpaque(context);
@ -1572,6 +1578,7 @@ void tf_task_activate(tf_task_t* task)
JS_SetPropertyStr(context, global, "trace", JS_NewCFunction(context, _tf_task_trace, "trace", 1));
JS_SetPropertyStr(context, global, "getStats", JS_NewCFunction(context, _tf_task_getStats, "getStats", 0));
JS_SetPropertyStr(context, global, "getDebug", JS_NewCFunction(context, _tf_task_getDebug, "getDebug", 0));
JS_SetPropertyStr(context, global, "disconnectionsDebug", JS_NewCFunction(context, _tf_task_disconnectionsDebug, "disconnectionsDebug", 0));
}
else
{