Commit 6e667aa9 authored by unknown's avatar unknown

Merge dev3-63.(none):/home/zhl/mysql/mysql-5.0/bug24793

into  dev3-63.(none):/home/zhl/mysql/mysql-5.1/bug24793


storage/ndb/src/common/transporter/TCP_Transporter.cpp:
  Auto merged
parents fc4c7564 76678a48
...@@ -152,6 +152,8 @@ TCP_Transporter::initTransporter() { ...@@ -152,6 +152,8 @@ TCP_Transporter::initTransporter() {
void void
TCP_Transporter::setSocketOptions(){ TCP_Transporter::setSocketOptions(){
int sockOptKeepAlive = 1;
if (setsockopt(theSocket, SOL_SOCKET, SO_RCVBUF, if (setsockopt(theSocket, SOL_SOCKET, SO_RCVBUF,
(char*)&sockOptRcvBufSize, sizeof(sockOptRcvBufSize)) < 0) { (char*)&sockOptRcvBufSize, sizeof(sockOptRcvBufSize)) < 0) {
#ifdef DEBUG_TRANSPORTER #ifdef DEBUG_TRANSPORTER
...@@ -166,6 +168,11 @@ TCP_Transporter::setSocketOptions(){ ...@@ -166,6 +168,11 @@ TCP_Transporter::setSocketOptions(){
#endif #endif
}//if }//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 // Set the TCP_NODELAY option so also small packets are sent
// as soon as possible // as soon as possible
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment