public void Stop() { IsRunning = false; MulticastDNSChannel.RemoveListener(this); _discoveredServices.Clear(); _discoveredIPs.Clear(); _currentServiceSearchMessage = null; _log.Info("Stopped search for service type '{0}'.", _currentServiceType); _currentServiceType = null; }
public async Task StopPublishingAsync() { if (!_publishing) { return; } _publishing = false; _currentServicePublishMessage = null; await AnnounceServiceStopPublishingAsync().ConfigureAwait(false); MulticastDNSChannel.RemoveListener(this); _log.Info("Stopped publishing service '{0}'.", FullServiceInstanceName); }