mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
added res.sendStatus(200); to stop client errors throwing
according to the docs "The methods on the response object (res) in the following table can send a response to the client, and terminate the request-response cycle. If none of these methods are called from a route handler, the client request will be left hanging." Last sentence is the critical one. Sending a status code 200 should fix the issue
This commit is contained in:
1 parent
adf6763a0d
commit
8672afe940
1 file changed
+1
@@ -362,6 +362,7 @@ app.post("/api/editSlaveMeta", authenticate.middleware, function(req,res) {
|
||||
let metaPortion = JSON.stringify(req.body.meta);
|
||||
if(metaPortion.length > 50) metaPortion = metaPortion.substring(0,20) + "...";
|
||||
// console.log("Updating slave "+slaves[req.body.instanceID].instanceName+": " + slaves[req.body.instanceID].mac + " : " + slaves[req.body.instanceID].serverPort+" at " + slaves[req.body.instanceID].publicIP, metaPortion);
|
||||
res.sendStatus(200);
|
||||
} else {
|
||||
res.send("ERROR: Invalid instanceID or password")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user