Commit f39974e6 authored by joreland@mysql.com's avatar joreland@mysql.com

wl1292

Try to remove rare timeouts by
Increased timeout in CpcClient and mgmapi
parent 33fe23e4
...@@ -93,8 +93,8 @@ readln_socket(NDB_SOCKET_TYPE socket, int timeout_millis, ...@@ -93,8 +93,8 @@ readln_socket(NDB_SOCKET_TYPE socket, int timeout_millis,
FD_ZERO(&readset); FD_ZERO(&readset);
FD_SET(socket, &readset); FD_SET(socket, &readset);
timeout.tv_sec = 1; timeout.tv_sec = (timeout_millis / 1000);
timeout.tv_usec = 0; // 1 s timeout.tv_usec = (timeout_millis % 1000) * 1000;
const int selectRes = select(socket + 1, &readset, 0, 0, &timeout); const int selectRes = select(socket + 1, &readset, 0, 0, &timeout);
if(selectRes != 1){ if(selectRes != 1){
return -1; return -1;
......
...@@ -478,7 +478,7 @@ SimpleCpcClient::connect() { ...@@ -478,7 +478,7 @@ SimpleCpcClient::connect() {
if (::connect(cpc_sock, (struct sockaddr*) &sa, sizeof(sa)) < 0) if (::connect(cpc_sock, (struct sockaddr*) &sa, sizeof(sa)) < 0)
return -1; return -1;
cpc_in = new SocketInputStream(cpc_sock); cpc_in = new SocketInputStream(cpc_sock, 60000);
cpc_out = new SocketOutputStream(cpc_sock); cpc_out = new SocketOutputStream(cpc_sock);
return 0; 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