mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix #190
This commit is contained in:
parent
8fd1446627
commit
d1f5c59eef
6 changed files with 34 additions and 23 deletions
|
|
@ -208,7 +208,7 @@ type Config struct {
|
|||
ProxyAllowedFrom []string `yaml:"proxy-allowed-from"`
|
||||
WebIRC []webircConfig `yaml:"webirc"`
|
||||
MaxSendQString string `yaml:"max-sendq"`
|
||||
MaxSendQBytes uint64
|
||||
MaxSendQBytes int
|
||||
ConnectionLimiter connection_limits.LimiterConfig `yaml:"connection-limits"`
|
||||
ConnectionThrottler connection_limits.ThrottlerConfig `yaml:"connection-throttling"`
|
||||
}
|
||||
|
|
@ -520,10 +520,11 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||
}
|
||||
}
|
||||
|
||||
config.Server.MaxSendQBytes, err = bytefmt.ToBytes(config.Server.MaxSendQString)
|
||||
maxSendQBytes, err := bytefmt.ToBytes(config.Server.MaxSendQString)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Could not parse maximum SendQ size (make sure it only contains whole numbers): %s", err.Error())
|
||||
}
|
||||
config.Server.MaxSendQBytes = int(maxSendQBytes)
|
||||
|
||||
// get language files
|
||||
config.Languages.Data = make(map[string]languages.LangData)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue