Allow fd:// like unix:// and tcp://
Somthing like 20605eb310f0b57bd06eea80ec63c5022fc83bde Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
This commit is contained in:
parent
8362e7cc10
commit
56cf7be334
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,11 @@ func ListenFD(addr string) ([]net.Listener, error) {
|
||||||
return nil, errors.New("No sockets found")
|
return nil, errors.New("No sockets found")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// default to all fds just like unix:// and tcp://
|
||||||
|
if addr == "" {
|
||||||
|
addr = "*"
|
||||||
|
}
|
||||||
|
|
||||||
fdNum, _ := strconv.Atoi(addr)
|
fdNum, _ := strconv.Atoi(addr)
|
||||||
fdOffset := fdNum - 3
|
fdOffset := fdNum - 3
|
||||||
if (addr != "*") && (len(files) < int(fdOffset)+1) {
|
if (addr != "*") && (len(files) < int(fdOffset)+1) {
|
||||||
|
|
Loading…
Reference in a new issue