Merge pull request #1526 from calmh/minreconnect

Don't allow arbitrarily short reconnection intervals (fixes #1524)
This commit is contained in:
Audrius Butkevicius 2015-03-26 13:01:29 +00:00
commit 9f67d86b30

View File

@ -370,6 +370,11 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) {
}
}
// Very short reconnection intervals are annoying
if cfg.Options.ReconnectIntervalS < 5 {
cfg.Options.ReconnectIntervalS = 5
}
cfg.Options.ListenAddress = uniqueStrings(cfg.Options.ListenAddress)
cfg.Options.GlobalAnnServers = uniqueStrings(cfg.Options.GlobalAnnServers)