Merge pull request #119 from kode54/master
Two minor fixes (connection rate limiting, default http index mime type)
This commit is contained in:
commit
ca08753d3b
@ -54,8 +54,15 @@ function Client(sockets, config) {
|
|||||||
});
|
});
|
||||||
if (config) {
|
if (config) {
|
||||||
var client = this;
|
var client = this;
|
||||||
|
var wait_total = 0;
|
||||||
_.each(config.networks || [], function(n) {
|
_.each(config.networks || [], function(n) {
|
||||||
|
if (wait_total == 0)
|
||||||
client.connect(n);
|
client.connect(n);
|
||||||
|
else
|
||||||
|
setTimeout(function() {
|
||||||
|
client.connect(n);
|
||||||
|
}, wait_total);
|
||||||
|
wait_total += 500;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,8 @@ function index(req, res, next) {
|
|||||||
require("../package.json"),
|
require("../package.json"),
|
||||||
config
|
config
|
||||||
);
|
);
|
||||||
|
res.setHeader("Content-Type", "text/html");
|
||||||
|
res.writeHead(200);
|
||||||
res.end(_.template(
|
res.end(_.template(
|
||||||
file,
|
file,
|
||||||
data
|
data
|
||||||
|
Loading…
Reference in New Issue
Block a user