From 3183ee7eab523f4b90446005f28f5c81e794c48d Mon Sep 17 00:00:00 2001 From: Mystikfluu Date: Sun, 24 Jul 2022 11:28:21 +0200 Subject: [PATCH] add debug level output for pid collision --- server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.js b/server.js index 403119b..e61402c 100644 --- a/server.js +++ b/server.js @@ -561,11 +561,13 @@ router.get("/api/pid", async function(req,res) { let pid = genstring(10) //collision chance is low enough, but we'll check anyways while (PIDS[pid] != undefined){ pid = genstring(10) + console.log(5,"pid collision"); } PIDS[pid] = true setTimeout(function() { PIDS[pid]=undefined },40000) + res.json({"pid":pid}) }) router.post("/api/post", async function(req,res) {