1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-06-12 05:01:56 +03:00

Removed a couple unused SM config params. Added retry loop

to getting a connection.
This commit is contained in:
Patrick LeBlanc
2019-07-29 14:44:18 -05:00
parent 00158c86ec
commit 303d182d5c
3 changed files with 13 additions and 4 deletions

View File

@ -93,14 +93,22 @@ int SocketPool::send_recv(messageqcpp::ByteStream &in, messageqcpp::ByteStream *
ssize_t err = 0;
retry:
/* should there be a retry limit here... */
int retries = 0;
while (sock < 0)
{
sock = getSocket();
if (sock < 0)
{
//log(logging::LOG_TYPE_ERROR, "SocketPool::send_recv(): retrying in 5 sec...");
sleep(1);
if (++retries < 10)
{
//log(logging::LOG_TYPE_ERROR, "SocketPool::send_recv(): retrying in 5 sec...");
sleep(1);
}
else
{
errno = ECONNREFUSED;
return -1;
}
}
}