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

@ -843,6 +843,10 @@ loadSettings().then(function() {
var data = trace();
response.writeHead(200, {"Content-Type": "application/json; charset=utf-8", "Content-Length": data.length.toString()});
return response.end(data);
} else if (match = /^\/disconnections$/.exec(request.uri)) {
var data = utf8Encode(JSON.stringify(disconnectionsDebug(), null, 2));
response.writeHead(200, {"Content-Type": "application/json; charset=utf-8", "Content-Length": data.byteLength.toString()});
return response.end(data);
} else if (match = /^\/debug$/.exec(request.uri)) {
var data = JSON.stringify(getDebug(), null, 2);
response.writeHead(200, {"Content-Type": "application/json; charset=utf-8", "Content-Length": data.length.toString()});