Fixed server root warning to output without -d flag to stdout

This commit is contained in:
Russ Magee 2018-07-13 20:26:48 -07:00
parent a8a4f1671a
commit f079b5b43d

View file

@ -213,12 +213,6 @@ func main() {
os.Exit(0) os.Exit(0)
} }
if dbg {
log.SetOutput(os.Stdout)
} else {
log.SetOutput(ioutil.Discard)
}
{ {
me, e := user.Current() me, e := user.Current()
if e != nil || me.Uid != "0" { if e != nil || me.Uid != "0" {
@ -226,6 +220,12 @@ func main() {
} }
} }
if dbg {
log.SetOutput(os.Stdout)
} else {
log.SetOutput(ioutil.Discard)
}
// Listen on TCP port 2000 on all available unicast and // Listen on TCP port 2000 on all available unicast and
// anycast IP addresses of the local system. // anycast IP addresses of the local system.
l, err := hkexnet.Listen("tcp", laddr) l, err := hkexnet.Listen("tcp", laddr)