reconnectRelays method
Reconnects all given relays
Implementation
Future<void> reconnectRelays(Iterable<String> urls) async {
final startTime = DateTime.now();
Logger.log.d("connecting ${urls.length} relays in parallel");
List<bool> connected = await Future.wait(urls.map((url) => reconnectRelay(
url,
connectionSource: ConnectionSource.EXPLICIT,
force: true)));
final endTime = DateTime.now();
final duration = endTime.difference(startTime);
Logger.log.d(
"CONNECTED ${connected.where((element) => element).length} , ${connected.where((element) => !element).length} FAILED, took ${duration.inMilliseconds} ms");
}