File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -1445,7 +1445,7 @@ setKeepalivesIdle(PGconn *conn)
1445
1445
idle = 0 ;
1446
1446
1447
1447
#ifdef PG_TCP_KEEPALIVE_IDLE
1448
- if (pg_setsockopt (conn -> sock , IPPROTO_TCP , TCP_KEEPIDLE ,
1448
+ if (pg_setsockopt (conn -> sock , IPPROTO_TCP , PG_TCP_KEEPALIVE_IDLE ,
1449
1449
(char * ) & idle , sizeof (idle ), conn -> isRsocket ) < 0 )
1450
1450
{
1451
1451
char sebuf [256 ];
@@ -1456,20 +1456,6 @@ setKeepalivesIdle(PGconn *conn)
1456
1456
SOCK_STRERROR (SOCK_ERRNO , sebuf , sizeof (sebuf )));
1457
1457
return 0 ;
1458
1458
}
1459
- #else
1460
- #ifdef TCP_KEEPALIVE
1461
- /* Darwin uses TCP_KEEPALIVE rather than TCP_KEEPIDLE */
1462
- if (pg_setsockopt (conn -> sock , IPPROTO_TCP , TCP_KEEPALIVE ,
1463
- (char * ) & idle , sizeof (idle ), conn -> isRsocket ) < 0 )
1464
- {
1465
- char sebuf [256 ];
1466
-
1467
- appendPQExpBuffer (& conn -> errorMessage ,
1468
- libpq_gettext ("setsockopt(TCP_KEEPALIVE) failed: %s\n" ),
1469
- SOCK_STRERROR (SOCK_ERRNO , sebuf , sizeof (sebuf )));
1470
- return 0 ;
1471
- }
1472
- #endif
1473
1459
#endif
1474
1460
1475
1461
return 1 ;
You can’t perform that action at this time.
0 commit comments