diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2008-01-23 13:04:36 +0100 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2008-01-23 13:04:36 +0100 |
commit | aa7b1b540c976f8d3ded2193dfdf27e920a49912 (patch) | |
tree | 88db94dc595039cc6e3dd4fa89bd678c8bf554bb | |
parent | 472fe4172a1157527632d1643eb698e4041cbcb5 (diff) | |
parent | ac632f5cbbb5b9acbbd8c6ec9d0147893e1878a2 (diff) | |
download | mariadb-git-aa7b1b540c976f8d3ded2193dfdf27e920a49912.tar.gz |
Merge perch.ndb.mysql.com:/home/jonas/src/50-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/50-ndb
ndb/src/common/transporter/TCP_Transporter.cpp:
Auto merged
-rw-r--r-- | ndb/src/common/transporter/TCP_Transporter.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/ndb/src/common/transporter/TCP_Transporter.cpp b/ndb/src/common/transporter/TCP_Transporter.cpp index c8095defd86..ea9e0944915 100644 --- a/ndb/src/common/transporter/TCP_Transporter.cpp +++ b/ndb/src/common/transporter/TCP_Transporter.cpp @@ -337,22 +337,32 @@ TCP_Transporter::doSend() { // Empty the SendBuffers - const char * const sendPtr = m_sendBuffer.sendPtr; - const Uint32 sizeToSend = m_sendBuffer.sendDataSize; - if (sizeToSend > 0){ + bool sent_any = true; + while (m_sendBuffer.dataSize > 0) + { + const char * const sendPtr = m_sendBuffer.sendPtr; + const Uint32 sizeToSend = m_sendBuffer.sendDataSize; const int nBytesSent = inet_send(theSocket, sendPtr, sizeToSend, 0); - if (nBytesSent > 0) { + if (nBytesSent > 0) + { + sent_any = true; m_sendBuffer.bytesSent(nBytesSent); sendCount ++; sendSize += nBytesSent; - if(sendCount == reportFreq){ + if(sendCount == reportFreq) + { reportSendLen(get_callback_obj(), remoteNodeId, sendCount, sendSize); sendCount = 0; sendSize = 0; } - } else { + } + else + { + if (nBytesSent < 0 && InetErrno == EAGAIN && sent_any) + break; + // Send failed #if defined DEBUG_TRANSPORTER ndbout_c("Send Failure(disconnect==%d) to node = %d nBytesSent = %d " |