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) {
|
||||
var client = this;
|
||||
var wait_total = 0;
|
||||
_.each(config.networks || [], function(n) {
|
||||
client.connect(n);
|
||||
if (wait_total == 0)
|
||||
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"),
|
||||
config
|
||||
);
|
||||
res.setHeader("Content-Type", "text/html");
|
||||
res.writeHead(200);
|
||||
res.end(_.template(
|
||||
file,
|
||||
data
|
||||
|
|
Loading…
Reference in New Issue