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 209d89a225b..de222c766c7 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -971,6 +971,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) { |