bug fixes for 2.6.5

+ Added potential fixes for #34 and #39
+ Added better error handling for #43
This commit is contained in:
Toby Chui
2023-08-17 14:08:48 +08:00
parent d42ac8a146
commit 70adadf129
7 changed files with 78 additions and 41 deletions

View File

@@ -36,6 +36,7 @@ import (
var noauth = flag.Bool("noauth", false, "Disable authentication for management interface")
var showver = flag.Bool("version", false, "Show version of this server")
var allowSshLoopback = flag.Bool("sshlb", false, "Allow loopback web ssh connection (DANGER)")
var allowMdnsScanning = flag.Bool("mdns", true, "Enable mDNS scanner and transponder")
var ztAuthToken = flag.String("ztauth", "", "ZeroTier authtoken for the local node")
var ztAPIPort = flag.Int("ztport", 9993, "ZeroTier controller API port")
var acmeAutoRenewInterval = flag.Int("autorenew", 86400, "ACME auto TLS/SSL certificate renew check interval (seconds)")
@@ -96,9 +97,12 @@ func ShutdownSeq() {
netstatBuffers.Close()
fmt.Println("- Closing Statistic Collector")
statisticCollector.Close()
fmt.Println("- Stopping mDNS Discoverer")
//Stop the mdns service
mdnsTickerStop <- true
if mdnsTickerStop != nil {
fmt.Println("- Stopping mDNS Discoverer")
// Stop the mdns service
mdnsTickerStop <- true
}
mdnsScanner.Close()
fmt.Println("- Closing Certificates Auto Renewer")
acmeAutoRenewer.Close()