mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-07 05:38:30 +02:00
Fixed #414
- Added sticky menu - Optimized terminate routine for nil check - Added test case for statistic module
This commit is contained in:
22
src/main.go
22
src/main.go
@@ -60,19 +60,31 @@ func SetupCloseHandler() {
|
||||
func ShutdownSeq() {
|
||||
SystemWideLogger.Println("Shutting down " + SYSTEM_NAME)
|
||||
SystemWideLogger.Println("Closing Netstats Listener")
|
||||
netstatBuffers.Close()
|
||||
if netstatBuffers != nil {
|
||||
netstatBuffers.Close()
|
||||
}
|
||||
|
||||
SystemWideLogger.Println("Closing Statistic Collector")
|
||||
statisticCollector.Close()
|
||||
if statisticCollector != nil {
|
||||
statisticCollector.Close()
|
||||
}
|
||||
|
||||
if mdnsTickerStop != nil {
|
||||
SystemWideLogger.Println("Stopping mDNS Discoverer (might take a few minutes)")
|
||||
// Stop the mdns service
|
||||
mdnsTickerStop <- true
|
||||
}
|
||||
mdnsScanner.Close()
|
||||
if mdnsScanner != nil {
|
||||
mdnsScanner.Close()
|
||||
}
|
||||
SystemWideLogger.Println("Shutting down load balancer")
|
||||
loadBalancer.Close()
|
||||
if loadBalancer != nil {
|
||||
loadBalancer.Close()
|
||||
}
|
||||
SystemWideLogger.Println("Closing Certificates Auto Renewer")
|
||||
acmeAutoRenewer.Close()
|
||||
if acmeAutoRenewer != nil {
|
||||
acmeAutoRenewer.Close()
|
||||
}
|
||||
//Remove the tmp folder
|
||||
SystemWideLogger.Println("Cleaning up tmp files")
|
||||
os.RemoveAll("./tmp")
|
||||
|
Reference in New Issue
Block a user