Prior to commit b5bf89c31, 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]: https://github.com/ishidawataru/sctp/commit/4b890084db30
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
| ... | ... |
@@ -178,11 +178,7 @@ func parseFlags() ProxyConfig {
|
| 178 | 178 |
} |
| 179 | 179 |
|
| 180 | 180 |
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) |
|
| 186 | 182 |
config.ListenSock = os.NewFile(listenSockFd, "listen-sock") |
| 187 | 183 |
} |
| 188 | 184 |
|