Implement --max-transfer flag to quit transferring at a limit #1655

This commit is contained in:
Nick Craig-Wood
2018-05-05 12:58:28 +01:00
parent d178233e74
commit 5c128272fd
6 changed files with 57 additions and 2 deletions
+2
View File
@@ -71,6 +71,7 @@ type ConfigInfo struct {
StatsFileNameLength int
AskPassword bool
UseServerModTime bool
MaxTransfer SizeSuffix
}
// NewConfig creates a new config with everything set to the default
@@ -98,6 +99,7 @@ func NewConfig() *ConfigInfo {
c.StatsFileNameLength = 40
c.AskPassword = true
c.TPSLimitBurst = 1
c.MaxTransfer = -1
return c
}