Skip to content

Commit 9dc0c09

Browse files
committed
cmd/docker-proxy: set O_NONBLOCK unconditionally
Prior to commit b5bf89c, all socket fds passed to the docker-proxy were getting the O_NONBLOCK flag set. However, that commit added support for SCTP socket-passing, and had to conditionally guard this behavior to not use it on SCTP sockets due to ishidawataru/sctp not clearing the flag. A fix was made in ishidawataru/sctp (see [1]), so we can remove that condition. [1]: ishidawataru/sctp@4b890084db30 Signed-off-by: Albin Kerouanton <albinker@gmail.com>
1 parent 1289701 commit 9dc0c09

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cmd/docker-proxy/main_linux.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,7 @@ func parseFlags() ProxyConfig {
178178
}
179179

180180
if useListenFd {
181-
// Unlike the stdlib, passing a non-blocking socket to `sctp.FileListener`
182-
// will result in a non-blocking Accept(). So, do not set this flag for SCTP.
183-
if config.Proto != "sctp" {
184-
_ = syscall.SetNonblock(int(listenSockFd), true)
185-
}
181+
_ = syscall.SetNonblock(int(listenSockFd), true)
186182
config.ListenSock = os.NewFile(listenSockFd, "listen-sock")
187183
}
188184

0 commit comments

Comments
 (0)