mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-15 21:32:17 +08:00
refactor join, fix network add; db retry connect; fix port issue; sqlite default
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"os/signal"
|
||||
"strconv"
|
||||
"syscall"
|
||||
|
||||
"runtime/debug"
|
||||
"github.com/gravitl/netmaker/netclient/command"
|
||||
"github.com/gravitl/netmaker/netclient/config"
|
||||
"github.com/gravitl/netmaker/netclient/local"
|
||||
@@ -318,6 +318,8 @@ func main() {
|
||||
},
|
||||
}
|
||||
|
||||
setGarbageCollection()
|
||||
|
||||
if netclientutils.IsWindows() {
|
||||
ncwindows.InitWindows()
|
||||
} else {
|
||||
@@ -364,3 +366,10 @@ func main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func setGarbageCollection(){
|
||||
_, gcset := os.LookupEnv("GOGC");
|
||||
if !gcset {
|
||||
debug.SetGCPercent(netclientutils.DEFAULT_GC_PERCENT)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user