add debug level output for pid collision
This commit is contained in:
parent
2fff81f5b2
commit
3183ee7eab
@ -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
|
let pid = genstring(10) //collision chance is low enough, but we'll check anyways
|
||||||
while (PIDS[pid] != undefined){
|
while (PIDS[pid] != undefined){
|
||||||
pid = genstring(10)
|
pid = genstring(10)
|
||||||
|
console.log(5,"pid collision");
|
||||||
}
|
}
|
||||||
PIDS[pid] = true
|
PIDS[pid] = true
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
PIDS[pid]=undefined
|
PIDS[pid]=undefined
|
||||||
},40000)
|
},40000)
|
||||||
|
res.json({"pid":pid})
|
||||||
})
|
})
|
||||||
|
|
||||||
router.post("/api/post", async function(req,res) {
|
router.post("/api/post", async function(req,res) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user