mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-27 01:13:01 +00:00
hotRelodaInterval --> hotReloadInterval
This commit is contained in:
parent
28b17b529d
commit
dd6769954c
@ -62,14 +62,14 @@ func (c *Config) BuildCertificates() []*xtls.Certificate {
|
|||||||
certs = append(certs, &keyPair)
|
certs = append(certs, &keyPair)
|
||||||
if !entry.OneTimeLoading {
|
if !entry.OneTimeLoading {
|
||||||
var isOcspstapling bool
|
var isOcspstapling bool
|
||||||
hotRelodaInterval := uint64(3600)
|
hotReloadInterval := uint64(3600)
|
||||||
if entry.OcspStapling != 0 {
|
if entry.OcspStapling != 0 {
|
||||||
hotRelodaInterval = entry.OcspStapling
|
hotReloadInterval = entry.OcspStapling
|
||||||
isOcspstapling = true
|
isOcspstapling = true
|
||||||
}
|
}
|
||||||
index := len(certs) - 1
|
index := len(certs) - 1
|
||||||
go func(entry *Certificate, cert *xtls.Certificate, index int) {
|
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 {
|
for {
|
||||||
if entry.CertificatePath != "" && entry.KeyPath != "" {
|
if entry.CertificatePath != "" && entry.KeyPath != "" {
|
||||||
newCert, err := filesystem.ReadFile(entry.CertificatePath)
|
newCert, err := filesystem.ReadFile(entry.CertificatePath)
|
||||||
|
Loading…
Reference in New Issue
Block a user