checkConnection method

Future<bool> checkConnection()

Implementation

Future<bool> checkConnection() {
  final pending = _probing;
  if (pending != null) return pending;

  final probe = _runProbe(_generation);
  _probing = probe;
  unawaited(
    probe.whenComplete(() {
      if (identical(_probing, probe)) _probing = null;
    }),
  );
  return probe;
}