Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
maiconkist committed Apr 3, 2019
1 parent 55073f2 commit 7587442
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/hydra_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,19 @@ std::string
hydra_client::check_connection(size_t max_tries)
{
size_t tries = 0;
size_t status;
int status;

while ( (status = discover_server(s_client_host, s_server_host)) < 0 &&
(tries++ < max_tries))
{
std::cout << boost::format("status: %d -- tries: %d") % status % tries << std::endl;
if (status < 0 && tries >= max_tries) return std::string("");

sleep(1);
}

std::cout << boost::format("status: %d -- tries: %d") % status % tries << std::endl;

// Set message type
std::string message = "{\"xvl_syn\":\"\"}";
// Send message and return acknowledgement
Expand Down

0 comments on commit 7587442

Please sign in to comment.