Skip to content

Commit

Permalink
hotRelodaInterval --> hotReloadInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
imroc authored and yuhan6665 committed Oct 27, 2021
1 parent 28b17b5 commit dd67699
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions transport/internet/xtls/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ func (c *Config) BuildCertificates() []*xtls.Certificate {
certs = append(certs, &keyPair)
if !entry.OneTimeLoading {
var isOcspstapling bool
hotRelodaInterval := uint64(3600)
hotReloadInterval := uint64(3600)
if entry.OcspStapling != 0 {
hotRelodaInterval = entry.OcspStapling
hotReloadInterval = entry.OcspStapling
isOcspstapling = true
}
index := len(certs) - 1
go func(entry *Certificate, cert *xtls.Certificate, index int) {
t := time.NewTicker(time.Duration(hotRelodaInterval) * time.Second)
t := time.NewTicker(time.Duration(hotReloadInterval) * time.Second)
for {
if entry.CertificatePath != "" && entry.KeyPath != "" {
newCert, err := filesystem.ReadFile(entry.CertificatePath)
Expand Down

0 comments on commit dd67699

Please sign in to comment.