summaryrefslogtreecommitdiff
path: root/databases/pgbouncer/files/patch-keepalive
diff options
context:
space:
mode:
authorSergey Skvortsov <skv@FreeBSD.org>2012-07-01 08:50:48 +0000
committerSergey Skvortsov <skv@FreeBSD.org>2012-07-01 08:50:48 +0000
commit93da9d017344d9518cfe3cf878984e2979933546 (patch)
tree46f1b305a331a43654131369f64cf2152656377f /databases/pgbouncer/files/patch-keepalive
parent- The FreeBSD Office team is proud to announce LibreOffice.org 3.5.4 release (diff)
* Update to 1.5.2 [1]
* Add patch to use TCP_KEEP{CNT, IDLE, INTVL, ALIVE} [2] Changes: http://pgfoundry.org/forum/forum.php?forum_id=1885 PR: ports/169463 [1] Submitted by: Dmitry <dmitry2004@yandex.ru> [1], Oleg A. Mamontov <oleg@mamontov.net> [2]
Notes
Notes: svn path=/head/; revision=300308
Diffstat (limited to 'databases/pgbouncer/files/patch-keepalive')
-rw-r--r--databases/pgbouncer/files/patch-keepalive46
1 files changed, 46 insertions, 0 deletions
diff --git a/databases/pgbouncer/files/patch-keepalive b/databases/pgbouncer/files/patch-keepalive
new file mode 100644
index 000000000000..5da439c89796
--- /dev/null
+++ b/databases/pgbouncer/files/patch-keepalive
@@ -0,0 +1,46 @@
+--- src/util.c.orig 2011-12-07 15:04:13.000000000 +0400
++++ src/util.c 2011-12-07 15:04:07.000000000 +0400
+@@ -126,7 +126,7 @@
+ res = setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
+ if (res < 0)
+ goto fail;
+-#ifdef __linux__
++#ifdef TCP_KEEPCNT
+ /* set count of keepalive packets */
+ if (cf_tcp_keepcnt > 0) {
+ val = cf_tcp_keepcnt;
+@@ -134,6 +134,8 @@
+ if (res < 0)
+ goto fail;
+ }
++#endif
++#ifdef TCP_KEEPIDLE
+ /* how long the connection can stay idle before sending keepalive pkts */
+ if (cf_tcp_keepidle) {
+ val = cf_tcp_keepidle;
+@@ -141,6 +143,8 @@
+ if (res < 0)
+ goto fail;
+ }
++#endif
++#ifdef TCP_KEEPINTVL
+ /* time between packets */
+ if (cf_tcp_keepintvl) {
+ val = cf_tcp_keepintvl;
+@@ -148,7 +152,7 @@
+ if (res < 0)
+ goto fail;
+ }
+-#else
++#endif
+ #ifdef TCP_KEEPALIVE
+ if (cf_tcp_keepidle) {
+ val = cf_tcp_keepidle;
+@@ -157,7 +161,6 @@
+ goto fail;
+ }
+ #endif
+-#endif
+ }
+
+ /* set in-kernel socket buffer size */