fix config default value (#538)
* fix config & state fields * revert state
This commit is contained in:
parent
07a942e234
commit
91a7c934e6
@ -89,6 +89,9 @@ func (c *Config) Read(path string) error {
|
|||||||
if c.AvgPingCount == 0 {
|
if c.AvgPingCount == 0 {
|
||||||
c.AvgPingCount = 2
|
c.AvgPingCount = 2
|
||||||
}
|
}
|
||||||
|
if c.Cover == 0 {
|
||||||
|
c.Cover = 1
|
||||||
|
}
|
||||||
if c.JWTSecretKey == "" {
|
if c.JWTSecretKey == "" {
|
||||||
c.JWTSecretKey, err = utils.GenerateRandomString(1024)
|
c.JWTSecretKey, err = utils.GenerateRandomString(1024)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user