Make node startup more robust

The connection attempts to all nodes are done over a period of time to
cope with slowly starting servers.
This commit is contained in:
Markus Mäkelä
2018-11-16 02:32:22 +02:00
parent 1f8180b8ee
commit d60e97dfa5
2 changed files with 30 additions and 2 deletions

View File

@ -153,6 +153,13 @@ public:
int connect(int i);
int connect();
/**
* Repeatedly try to connect with one second sleep in between attempts
*
* @return True on success
*/
bool robust_connect(int n);
/**
* @brief Close connections opened by connect()
*