Date: Thursday, October 19, 2006 @ 15:20:02
Author: gilles
Path: /cvsroot/carob/carob/src
Modified: JavaSocket.cpp (1.54 -> 1.55)
Enabled tcp keepalive mechanism on sockets, waiting for a better way to detect
network failures
First implem of CAROB-110
----------------+
JavaSocket.cpp | 8 ++++++++
1 files changed, 8 insertions(+)
Index: carob/src/JavaSocket.cpp
diff -u carob/src/JavaSocket.cpp:1.54 carob/src/JavaSocket.cpp:1.55
--- carob/src/JavaSocket.cpp:1.54 Mon Oct 9 19:30:57 2006
+++ carob/src/JavaSocket.cpp Thu Oct 19 15:20:02 2006
@@ -112,6 +112,14 @@
return false;
}
+ // Turn keepalive mechanism on
+ int keepalive = 1;
+ if (setsockopt(socketFd, SOL_SOCKET, SO_KEEPALIVE, &keepalive,
sizeof(keepalive)) < 0)
+ {
+ if (isErrorEnabled())
+ logError(fctName, L"Could not set socket keepalive flag");
+ }
+
if (isDebugEnabled())
logDebug(fctName, L"Socket created.");
return true;
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits