File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -669,25 +669,43 @@ func main() {
669669 }
670670
671671 if ! disableTelemetry {
672- telemetryStopProcessing <- true
673- stopheartbeat <- true
674- stopSnapshots <- true
672+ logger .Printf ("stopping telemetry service thread" )
673+ select {
674+ case telemetryStopProcessing <- true :
675+ default :
676+ }
677+
678+ logger .Printf ("stop heartbeat thread" )
679+ select {
680+ case stopheartbeat <- true :
681+ default :
682+ }
683+
684+ logger .Printf ("stop snapshot thread" )
685+ select {
686+ case stopSnapshots <- true :
687+ default :
688+ }
675689 }
676690
691+ logger .Printf ("stop cns service" )
677692 // Cleanup.
678693 if httpRestService != nil {
679694 httpRestService .Stop ()
680695 }
681696
682697 if startCNM {
698+ logger .Printf ("stop cnm plugin" )
683699 if netPlugin != nil {
684700 netPlugin .Stop ()
685701 }
686702
687703 if ipamPlugin != nil {
704+ logger .Printf ("stop ipam plugin" )
688705 ipamPlugin .Stop ()
689706 }
690707 }
691708
709+ logger .Printf ("CNS exited" )
692710 logger .Close ()
693711}
You can’t perform that action at this time.
0 commit comments