diff options
author | unknown <stewart@mysql.com[stewart]> | 2007-03-22 22:35:19 +1100 |
---|---|---|
committer | unknown <stewart@mysql.com[stewart]> | 2007-03-22 22:35:19 +1100 |
commit | a69b2aa7d4fae14cb042e32df3d005aa90c406c9 (patch) | |
tree | c9c7d0d40493ff554f81b676e478750b0332d5be /storage | |
parent | aa8b15b70b80f6c33c05a1aaf3d926bf10715525 (diff) | |
download | mariadb-git-a69b2aa7d4fae14cb042e32df3d005aa90c406c9.tar.gz |
[PATCH] WL#3704 mgmapi timeouts: use timeouts in mgm client
as side effect - turbo accellerator patch for ndb_mgm - sholud make it quicker... so that 4mhz cpu will seem even faster.
Index: ndb-work/storage/ndb/src/mgmclient/CommandInterpreter.cpp
===================================================================
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
WL#3704 mgmapi timeouts: use timeouts in mgm client
Diffstat (limited to 'storage')
-rw-r--r-- | storage/ndb/src/mgmclient/CommandInterpreter.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/ndb/src/mgmclient/CommandInterpreter.cpp b/storage/ndb/src/mgmclient/CommandInterpreter.cpp index fdcea63640c..793b2e3cc98 100644 --- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp @@ -726,10 +726,9 @@ event_thread_run(void* p) do_event_thread= 1; char *tmp= 0; char buf[1024]; - SocketInputStream in(fd,10); do { - if (tmp == 0) NdbSleep_MilliSleep(10); - if((tmp = in.gets(buf, 1024))) + SocketInputStream in(fd,2000); + if((tmp = in.gets(buf, sizeof(buf)))) { const char ping_token[]= "<PING>"; if (memcmp(ping_token,tmp,sizeof(ping_token)-1)) @@ -739,6 +738,10 @@ event_thread_run(void* p) ndbout << tmp; } } + else if(in.timedout() && ndb_mgm_check_connection(handle)<0) + { + break; + } } while(do_event_thread); NDB_CLOSE_SOCKET(fd); } |