mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-12-08 00:22:07 +00:00
Only set mobile memory limit on supported Go versions
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"regexp"
|
||||
"runtime/debug"
|
||||
|
||||
"github.com/gologme/log"
|
||||
|
||||
@@ -45,7 +44,7 @@ func (m *Yggdrasil) StartAutoconfigure() error {
|
||||
// StartJSON starts a node with the given JSON config. You can get JSON config
|
||||
// (rather than HJSON) by using the GenerateConfigJSON() function
|
||||
func (m *Yggdrasil) StartJSON(configjson []byte) error {
|
||||
debug.SetMemoryLimit(1024 * 1024 * 40)
|
||||
setMemLimitIfPossible()
|
||||
|
||||
m.logger = log.New(m.log, "", 0)
|
||||
m.logger.EnableLevel("error")
|
||||
|
||||
Reference in New Issue
Block a user