summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <lzhou/zhl@dev3-63.(none)>2007-03-30 17:12:48 +0000
committerunknown <lzhou/zhl@dev3-63.(none)>2007-03-30 17:12:48 +0000
commit1f7b3e569df0212219c0741aa70f240f09e02772 (patch)
tree44b20eff8845c45de5b38bd9c044bfec366768f8 /ndb
parentd21db829d8af5c7b0f198d96e8bf53d106d45529 (diff)
parent76678a48e2df70b9ff3ae44e4de9c8c0e9a743e2 (diff)
downloadmariadb-git-1f7b3e569df0212219c0741aa70f240f09e02772.tar.gz
Merge lzhou@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb-bj
into dev3-63.(none):/home/zhl/mysql/mysql-5.0/bug24793 ndb/src/common/transporter/TCP_Transporter.cpp: Auto merged
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/common/transporter/TCP_Transporter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/ndb/src/common/transporter/TCP_Transporter.cpp b/ndb/src/common/transporter/TCP_Transporter.cpp
index 9f873f0476c..c8095defd86 100644
--- a/ndb/src/common/transporter/TCP_Transporter.cpp
+++ b/ndb/src/common/transporter/TCP_Transporter.cpp
@@ -155,6 +155,8 @@ TCP_Transporter::initTransporter() {
void
TCP_Transporter::setSocketOptions(){
+ int sockOptKeepAlive = 1;
+
if (setsockopt(theSocket, SOL_SOCKET, SO_RCVBUF,
(char*)&sockOptRcvBufSize, sizeof(sockOptRcvBufSize)) < 0) {
#ifdef DEBUG_TRANSPORTER
@@ -169,6 +171,11 @@ TCP_Transporter::setSocketOptions(){
#endif
}//if
+ if (setsockopt(theSocket, SOL_SOCKET, SO_KEEPALIVE,
+ (char*)&sockOptKeepAlive, sizeof(sockOptKeepAlive)) < 0) {
+ ndbout_c("The setsockopt SO_KEEPALIVE error code = %d", InetErrno);
+ }//if
+
//-----------------------------------------------
// Set the TCP_NODELAY option so also small packets are sent
// as soon as possible