mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 19:10:54 +00:00
Merge pull request #83 from shxsun/master
In go version 1.0.3 will call build error
This commit is contained in:
commit
8358e0ff48
21
reload.go
21
reload.go
@ -137,16 +137,15 @@ func GetInitListner(tcpaddr *net.TCPAddr) (l net.Listener, err error) {
|
|||||||
countStr := os.Getenv(FDKey)
|
countStr := os.Getenv(FDKey)
|
||||||
if countStr == "" {
|
if countStr == "" {
|
||||||
return net.ListenTCP("tcp", tcpaddr)
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user