diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2007-11-14 10:46:34 +0100 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2007-11-14 10:46:34 +0100 |
commit | 7e7668e4b5c60e0f1824a85ea5de0d40d7373cc1 (patch) | |
tree | 7bfe4375b4949b21f97e4685fa015886b8444dcd | |
parent | 5ac346667ce71c169ac730fdb04488ac1a4d4f59 (diff) | |
download | mariadb-git-7e7668e4b5c60e0f1824a85ea5de0d40d7373cc1.tar.gz |
ndb - bug#32359
Increase connection negotiation timeout
Improve some weirdness
storage/ndb/src/common/transporter/Transporter.cpp:
- Increase connection negotiation timeout
- return false if trying to connect when already connected (should still be assert)
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
Use correct "is_connected" checks
(although this is kind of bogus and should be cleaned-up)
-rw-r--r-- | storage/ndb/src/common/transporter/Transporter.cpp | 4 | ||||
-rw-r--r-- | storage/ndb/src/common/transporter/TransporterRegistry.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/storage/ndb/src/common/transporter/Transporter.cpp b/storage/ndb/src/common/transporter/Transporter.cpp index cec018575e0..269a5fba4e9 100644 --- a/storage/ndb/src/common/transporter/Transporter.cpp +++ b/storage/ndb/src/common/transporter/Transporter.cpp @@ -70,7 +70,7 @@ Transporter::Transporter(TransporterRegistry &t_reg, signalIdUsed = _signalId; m_connected = false; - m_timeOutMillis = 1000; + m_timeOutMillis = 30000; m_connect_address.s_addr= 0; if(s_port<0) @@ -101,7 +101,7 @@ Transporter::connect_server(NDB_SOCKET_TYPE sockfd) { if(m_connected) { - DBUG_RETURN(true); // TODO assert(0); + DBUG_RETURN(false); // TODO assert(0); } { diff --git a/storage/ndb/src/common/transporter/TransporterRegistry.cpp b/storage/ndb/src/common/transporter/TransporterRegistry.cpp index 5f5f3c17b2d..848738b2983 100644 --- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp +++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp @@ -758,7 +758,8 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis) TCP_Transporter * t = theTCPTransporters[i]; // If the transporter is connected - if (t->isConnected()) { + NodeId nodeId = t->getRemoteNodeId(); + if (is_connected(nodeId) && t->isConnected()) { const NDB_SOCKET_TYPE socket = t->getSocket(); // Find the highest socket value. It will be used by select |