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
This commit is contained in:
unknown 2004-07-11 08:55:32 +02:00
parent 1baac2a70c
commit 9e38156bed
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -478,9 +478,9 @@ 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;
}