/// <summary> /// Disconnects, without closing. Upon re-connection all existing subscriptions /// and publications will be restablished. /// </summary> public async Task Disconnect() { if (log.IsDebugEnabled) { log.Debug("Disconnecting from " + URL); } if (CONNECTED == Interlocked.CompareExchange(ref _isConnected, NOT_CONNECTED, CONNECTED)) { await _ctrl.DisconnectAsync(); _ctrl = null; OnDisconnect(new OnDisconnectEventArgs(URL)); if (log.IsDebugEnabled) { log.Debug("Disconnected from " + URL); } } else { if (log.IsWarnEnabled) { log.Warn("Unable to disconnect from " + URL); } } }
/// <summary> /// Disconnects, without closing. Upon re-connection all existing subscriptions /// and publications will be restablished. /// </summary> public async Task Disconnect() { System.Diagnostics.Debug.WriteLine($"Disconnecting from {URL}"); if (CONNECTED == Interlocked.CompareExchange(ref _isConnected, NOT_CONNECTED, CONNECTED)) { await _ctrl.DisconnectAsync(); _ctrl = null; OnDisconnect(new OnDisconnectEventArgs(URL)); System.Diagnostics.Debug.WriteLine($"Disconnected from {URL}"); } else { System.Diagnostics.Debug.WriteLine($"Unable to disconnect from {URL}"); } }
public void Disconnect() { ctrlLink.DisconnectAsync(); OnDisconnect(this.url); }
public void Disconnect() { ctrlLink.DisconnectAsync(); OnDisconnect(this, new StringHandlerEventArgs(this.url)); }