mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
allow some latency
This commit is contained in:
parent
b7929d06d3
commit
add4d1abac
@ -67,11 +67,13 @@ function requestHandler(req, res) {
|
||||
var local_path = req.url.path_list[0];
|
||||
logging.log(req.id, req.method, req.url.href);
|
||||
|
||||
toobusy.maxLag(200);
|
||||
if (toobusy()) {
|
||||
res.writeHead(503, {
|
||||
"Content-Type": "text/plain"
|
||||
});
|
||||
res.end("Server is over capaacity :/");
|
||||
logging.log(req.id, 503, Date.now() - req.start + "ms", "(error)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user