fix config default value (#538)

* fix config & state fields

* revert state
This commit is contained in:
UUBulb 2024-12-02 21:10:40 +08:00 committed by GitHub
parent 07a942e234
commit 91a7c934e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,6 +89,9 @@ func (c *Config) Read(path string) error {
if c.AvgPingCount == 0 {
c.AvgPingCount = 2
}
if c.Cover == 0 {
c.Cover = 1
}
if c.JWTSecretKey == "" {
c.JWTSecretKey, err = utils.GenerateRandomString(1024)
if err != nil {