improved bwrate limiting implementation
New method is much better. Avoids unrestrained transfer at the beginning (except for the first block. Keeps right at or a few kb/s below the configured limit, with very little varation in the actual reported bandwidth. Removed the /s part of the config as it's not needed. Ready to merge. Sponsored-by: Luke Shumaker on Patreon
This commit is contained in:
parent
44d3d50785
commit
e8496d62e4
5 changed files with 46 additions and 55 deletions
|
@ -407,9 +407,9 @@ extractRemoteGitConfig r remotename = do
|
|||
, remoteAnnexStallDetection =
|
||||
either (const Nothing) Just . parseStallDetection
|
||||
=<< getmaybe "stalldetection"
|
||||
, remoteAnnexBwLimit =
|
||||
either (const Nothing) Just . parseBwRate
|
||||
=<< getmaybe "bwlimit"
|
||||
, remoteAnnexBwLimit = do
|
||||
sz <- readSize dataUnits =<< getmaybe "bwlimit"
|
||||
return (BwRate sz (Duration 1))
|
||||
, remoteAnnexAllowUnverifiedDownloads = (== Just "ACKTHPPT") $
|
||||
getmaybe ("security-allow-unverified-downloads")
|
||||
, remoteAnnexConfigUUID = toUUID <$> getmaybe "config-uuid"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue