From f079b5b43d3d5a936ad0e56aaedad3e3dc419983 Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Fri, 13 Jul 2018 20:26:48 -0700 Subject: [PATCH] Fixed server root warning to output without -d flag to stdout --- hkexshd/hkexshd.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hkexshd/hkexshd.go b/hkexshd/hkexshd.go index 0c2aae0..5d28f75 100644 --- a/hkexshd/hkexshd.go +++ b/hkexshd/hkexshd.go @@ -213,12 +213,6 @@ func main() { os.Exit(0) } - if dbg { - log.SetOutput(os.Stdout) - } else { - log.SetOutput(ioutil.Discard) - } - { me, e := user.Current() 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 // anycast IP addresses of the local system. l, err := hkexnet.Listen("tcp", laddr)