# cancelPing method

1. @visibleForOverriding

Future <void> cancelPing()

Cancel a potentially scheduled ping timer. Can be overriden to cancel a custom timing mechanism. By default, cancels a Timer.periodic that was set up prior.

## Implementation

    @visibleForOverriding
    Future<void> cancelPing() async {
      await _timerLock.synchronized(() {
        logger.finest('Cancelling timer');
        _pingTimer?.cancel();
        _pingTimer = null;
      });
    }