lib/connections: Allow on the fly changes to rate limits (fixes #3846)

Also replaces github.com/juju/ratelimit with golang.org/x/time/rate as
the latter supports changing the rate on the fly.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3862
This commit is contained in:
Jakob Borg authored and Audrius Butkevicius committed 2017-01-02 11:29:20 +00:00
1 parent 8c34a76f7a
commit ec62888539
19 files changed
+661 -1155

No files matched your search

-3
View File
@@ -637,9 +637,6 @@ func syncthingMain(runtimeOptions RuntimeOptions) {
},
}
// If the read or write rate should be limited, set up a rate limiter for it.
// This will be used on connections created in the connect and listen routines.
opts := cfg.Options()
if !opts.SymlinksEnabled {