stop method
Stops continuous discovery. Safe to call when not running.
Implementation
@override
void stop() {
_timeoutTimer?.cancel();
_timeoutTimer = null;
_controlSubscription?.cancel();
_controlSubscription = null;
if (_queryId != null) {
connection.unquery(_queryId!);
_queryId = null;
}
for (final handle in _handles.values.toList(growable: false)) {
if (handle.ownedByDiscovery && !handle.disposed) handle.dispose();
}
_handles.clear();
}