Commit 9e38156b authored by unknown's avatar unknown

wl1292

Try to remove rare timeouts by
Increased timeout in CpcClient and mgmapi


ndb/src/common/util/socket_io.cpp:
  Increased timeout in CpcClient and mgmapi
ndb/src/mgmclient/CpcClient.cpp:
  Increased timeout in CpcClient and mgmapi
parent 1baac2a7
......@@ -93,8 +93,8 @@ readln_socket(NDB_SOCKET_TYPE socket, int timeout_millis,
FD_ZERO(&readset);
FD_SET(socket, &readset);
timeout.tv_sec = 1;
timeout.tv_usec = 0; // 1 s
timeout.tv_sec = (timeout_millis / 1000);
timeout.tv_usec = (timeout_millis % 1000) * 1000;
const int selectRes = select(socket + 1, &readset, 0, 0, &timeout);
if(selectRes != 1){
return -1;
......
......@@ -478,7 +478,7 @@ SimpleCpcClient::connect() {
if (::connect(cpc_sock, (struct sockaddr*) &sa, sizeof(sa)) < 0)
return -1;
cpc_in = new SocketInputStream(cpc_sock);
cpc_in = new SocketInputStream(cpc_sock, 60000);
cpc_out = new SocketOutputStream(cpc_sock);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment