minor tweaks to have full feature parity before unittest broke

This commit is contained in:
Benjamin Sergeant 2019-05-11 11:54:21 -07:00
parent edac7a0171
commit 0caeb81327
2 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
1.5.2
1.5.3

View File

@ -221,6 +221,7 @@ namespace ix
uint32_t retries = 0;
millis duration;
ix::WebSocketInitResult status;
// Try to connect perpertually
while (true)
@ -239,14 +240,14 @@ namespace ix
firstConnectionAttempt = false;
// Only sleep if we are retrying
if (retries != 0)
if (duration.count() > 0)
{
// to do: make sleeping conditional
std::this_thread::sleep_for(duration);
}
// Try to connect synchronously
ix::WebSocketInitResult status = connect(_handshakeTimeoutSecs);
status = connect(_handshakeTimeoutSecs);
if (!status.success)
{