Merge pull request #83 from shxsun/master
In go version 1.0.3 will call build error
Showing
1 changed file
with
10 additions
and
11 deletions
| ... | @@ -137,16 +137,15 @@ func GetInitListner(tcpaddr *net.TCPAddr) (l net.Listener, err error) { | ... | @@ -137,16 +137,15 @@ func GetInitListner(tcpaddr *net.TCPAddr) (l net.Listener, err error) { |
| 137 | countStr := os.Getenv(FDKey) | 137 | countStr := os.Getenv(FDKey) |
| 138 | if countStr == "" { | 138 | if countStr == "" { |
| 139 | return net.ListenTCP("tcp", tcpaddr) | 139 | return net.ListenTCP("tcp", tcpaddr) |
| 140 | } else { | ||
| 141 | count, err := strconv.Atoi(countStr) | ||
| 142 | if err != nil { | ||
| 143 | return nil, err | ||
| 144 | } | ||
| 145 | f := os.NewFile(uintptr(count), "listen socket") | ||
| 146 | l, err = net.FileListener(f) | ||
| 147 | if err != nil { | ||
| 148 | return nil, err | ||
| 149 | } | ||
| 150 | return l, nil | ||
| 151 | } | 140 | } |
| 141 | count, err := strconv.Atoi(countStr) | ||
| 142 | if err != nil { | ||
| 143 | return nil, err | ||
| 144 | } | ||
| 145 | f := os.NewFile(uintptr(count), "listen socket") | ||
| 146 | l, err = net.FileListener(f) | ||
| 147 | if err != nil { | ||
| 148 | return nil, err | ||
| 149 | } | ||
| 150 | return l, nil | ||
| 152 | } | 151 | } | ... | ... |
-
Please register or sign in to post a comment