mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +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) {
|
||||
var client = this;
|
||||
var wait_total = 0;
|
||||
_.each(config.networks || [], function(n) {
|
||||
if (wait_total == 0)
|
||||
client.connect(n);
|
||||
else
|
||||
setTimeout(function() {
|
||||
client.connect(n);
|
||||
}, wait_total);
|
||||
wait_total += 500;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue