Add additional debugging output to keepalive handling

This commit is contained in:
Travis Cross 2014-02-11 05:40:41 +00:00
parent 3ae189ca3f
commit 2b064e6393
1 changed files with 8 additions and 4 deletions

View File

@ -202,12 +202,16 @@ int tport_tcp_init_secondary(tport_t *self, int socket, int accepted,
__func__, (void *)self,
self->tp_params->tpp_keepalive));
#if defined(TCP_KEEPIDLE)
if (val != 0 && val != UINT_MAX)
setsockopt(socket, SOL_TCP, TCP_KEEPIDLE, (void *)&val, sizeof val);
if (val != 0 && val != UINT_MAX) {
SU_DEBUG_3(("%s(%p): Setting TCP_KEEPIDLE to %d\n",
__func__, (void *)self, val));
setsockopt(socket, SOL_TCP, TCP_KEEPIDLE, (void *)&val, sizeof val);}
#endif
#if defined(TCP_KEEPINTVL)
if (val != 0 && val != UINT_MAX)
setsockopt(socket, SOL_TCP, TCP_KEEPINTVL, (void *)&val, sizeof val);
if (val != 0 && val != UINT_MAX) {
SU_DEBUG_3(("%s(%p): Setting TCP_KEEPINTVL to %d\n",
__func__, (void *)self, val));
setsockopt(socket, SOL_TCP, TCP_KEEPINTVL, (void *)&val, sizeof val);}
#endif
if (!accepted)