From 1687ec85deaaecd4bda5be32519368c35c628016 Mon Sep 17 00:00:00 2001 From: sun shengxiang Date: Tue, 25 Jun 2013 21:40:42 +0800 Subject: [PATCH] fix build problem --- reload.go | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/reload.go b/reload.go index 961ccd75..3d91b9f5 100644 --- a/reload.go +++ b/reload.go @@ -137,16 +137,15 @@ func GetInitListner(tcpaddr *net.TCPAddr) (l net.Listener, err error) { countStr := os.Getenv(FDKey) if countStr == "" { return net.ListenTCP("tcp", tcpaddr) - } else { - count, err := strconv.Atoi(countStr) - if err != nil { - return nil, err - } - f := os.NewFile(uintptr(count), "listen socket") - l, err = net.FileListener(f) - if err != nil { - return nil, err - } - return l, nil } + count, err := strconv.Atoi(countStr) + if err != nil { + return nil, err + } + f := os.NewFile(uintptr(count), "listen socket") + l, err = net.FileListener(f) + if err != nil { + return nil, err + } + return l, nil }