mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
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
This commit is contained in:
parent
1baac2a70c
commit
9e38156bed
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue