diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2007-05-18 11:17:27 +0200 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2007-05-18 11:17:27 +0200 |
commit | 27d82d38c4d3b9276a6103b2e814bd7b61bb9f17 (patch) | |
tree | 92ad07e337fe8ad4d1111b505dcb0c53d2d2ad4c /ndb | |
parent | 7f6742d1670adb6e24414fe7d0e6cdd89c272f3a (diff) | |
parent | d1625447c0199e5afe2b8e8357f1187277b95625 (diff) | |
download | mariadb-git-27d82d38c4d3b9276a6103b2e814bd7b61bb9f17.tar.gz |
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
ndb/src/common/transporter/TransporterRegistry.cpp:
Auto merged
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/common/transporter/TransporterRegistry.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/ndb/src/common/transporter/TransporterRegistry.cpp b/ndb/src/common/transporter/TransporterRegistry.cpp index e3836705e59..55b31becd8f 100644 --- a/ndb/src/common/transporter/TransporterRegistry.cpp +++ b/ndb/src/common/transporter/TransporterRegistry.cpp @@ -848,22 +848,6 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis) return 0; } - struct timeval timeout; -#ifdef NDB_OSE - // Return directly if there are no TCP transporters configured - - if(timeOutMillis <= 1){ - timeout.tv_sec = 0; - timeout.tv_usec = 1025; - } else { - timeout.tv_sec = timeOutMillis / 1000; - timeout.tv_usec = (timeOutMillis % 1000) * 1000; - } -#else - timeout.tv_sec = timeOutMillis / 1000; - timeout.tv_usec = (timeOutMillis % 1000) * 1000; -#endif - NDB_SOCKET_TYPE maxSocketValue = -1; // Needed for TCP/IP connections @@ -889,6 +873,24 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis) hasdata |= t->hasReceiveData(); } + timeOutMillis = hasdata ? 0 : timeOutMillis; + + struct timeval timeout; +#ifdef NDB_OSE + // Return directly if there are no TCP transporters configured + + if(timeOutMillis <= 1){ + timeout.tv_sec = 0; + timeout.tv_usec = 1025; + } else { + timeout.tv_sec = timeOutMillis / 1000; + timeout.tv_usec = (timeOutMillis % 1000) * 1000; + } +#else + timeout.tv_sec = timeOutMillis / 1000; + timeout.tv_usec = (timeOutMillis % 1000) * 1000; +#endif + // The highest socket value plus one maxSocketValue++; |