Skip to content

Commit

Permalink
feat: more delay in runUntilSecondaryExists
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyTubongbanua committed Sep 29, 2022
1 parent 31d8ea0 commit 819e16f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/api_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,12 @@ class ApiUtil {
} while(!exists && count < timeout);
if(sAddress.host.length > 2) {
print('Secondary address found! ${sAddress.host}:${sAddress.port} | Iterations: $count/$timeout');
print('Connecting...');
await Future.delayed(Duration(seconds: 5));
} else {
print('Secondary address not found after $count/$timeout iterations');
throw Exception('Secondary address not found after $count/$timeout iterations');
}
throw Exception('Secondary address not found after $count/$timeout iterations');
}
}

Expand Down

0 comments on commit 819e16f

Please sign in to comment.