diff options
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.c')
-rw-r--r-- | rpc/rpc-transport/socket/src/socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index e4f72cd8bdc..3aae10bd501 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -865,6 +865,8 @@ __socket_keepalive (int fd, int family, int keepalive_intvl, } #if defined(TCP_USER_TIMEOUT) + if (timeout_ms < 0) + goto done; ret = setsockopt (fd, IPPROTO_TCP , TCP_USER_TIMEOUT, &timeout_ms, sizeof (timeout_ms)); if (ret == -1) { |