mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Merge lzhou@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb-bj
into dev3-63.(none):/home/zhl/mysql/mysql-5.0/bug24793
This commit is contained in:
commit
eecdb3baf1
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue