mirror of
https://github.com/thelounge/thelounge
synced 2025-02-17 05:38:25 +00:00
Add a 500ms between network connections, to prevent hitting operating system rate limiting.
This commit is contained in:
parent
6bcbe1b702
commit
b32520b1f9
1 changed files with 8 additions and 1 deletions
|
@ -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) {
|
||||||
client.connect(n);
|
if (wait_total == 0)
|
||||||
|
client.connect(n);
|
||||||
|
else
|
||||||
|
setTimeout(function() {
|
||||||
|
client.connect(n);
|
||||||
|
}, wait_total);
|
||||||
|
wait_total += 500;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue