File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -202,8 +202,7 @@ func (c *ClusterSync) monitorBootstrapKey() {
202202 break
203203 }
204204 if key == c .cfg .Cluster .ActiveBootstrapKey .Load () {
205- fetched := c .cfg .Cluster .CertificateFetched .Load ()
206- if ! fetched {
205+ if ! c .cfg .Cluster .CertificateFetched .Load () {
207206 c .certFetch <- struct {}{}
208207 }
209208 break
@@ -258,7 +257,9 @@ func (c *ClusterSync) monitorBootstrapKey() {
258257 log .Warning (err )
259258 break
260259 }
261- c .certFetch <- struct {}{}
260+ if ! c .cfg .Cluster .CertificateFetched .Load () {
261+ c .certFetch <- struct {}{}
262+ }
262263 case <- c .Context .Done ():
263264 return
264265 }
@@ -461,7 +462,9 @@ func (c *ClusterSync) activateFetchCert(err error) {
461462 go func (err error ) {
462463 log .Warning (err )
463464 time .Sleep (1 * time .Minute )
464- c .certFetch <- struct {}{}
465+ if ! c .cfg .Cluster .CertificateFetched .Load () {
466+ c .certFetch <- struct {}{}
467+ }
465468 }(err )
466469}
467470
@@ -528,7 +531,9 @@ func (c *ClusterSync) fetchCert() {
528531 }
529532 if ! certFetched {
530533 time .AfterFunc (time .Minute , func () {
531- c .certFetch <- struct {}{}
534+ if ! c .cfg .Cluster .CertificateFetched .Load () {
535+ c .certFetch <- struct {}{}
536+ }
532537 })
533538 }
534539 }
You can’t perform that action at this time.
0 commit comments