master.js: fix missing response for /api/getID

According to rfc2616#section-6:

> After receiving and interpreting a request message, a server
> responds with an HTTP response message.

That response was missing for /api/getID which could lead to
EMFILE, because needle module was waiting indefiniately for
response from server. Since client sends /api/getID once every 10
seconds, this piles up, ultimately reaching ulimit for opened file
descriptors.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
This commit is contained in:
Michał Łyszczek committed 2020-08-27 04:05:52 +02:00
1 parent 7569c4a878
commit 1bdf23d960
1 file changed
+1
+1
View File
@@ -329,6 +329,7 @@ app.post("/api/getID", authenticate.middleware, function(req,res) {
} }
// console.log("Slave registered: " + slaves[req.body.unique].mac + " : " + slaves[req.body.unique].serverPort+" at " + slaves[req.body.unique].publicIP + " with name " + slaves[req.body.unique].instanceName); // console.log("Slave registered: " + slaves[req.body.unique].mac + " : " + slaves[req.body.unique].serverPort+" at " + slaves[req.body.unique].publicIP + " with name " + slaves[req.body.unique].instanceName);
} }
res.sendStatus(200);
}); });
/** /**
POST Allows you to add metadata related to slaves for other tools, like owner data, descriptions or statistics. POST Allows you to add metadata related to slaves for other tools, like owner data, descriptions or statistics.