public void Stop() { if (kernel.Started) { kernel.Stop(); } Unsubscribe(); tryToReconnect = false; if (client.IsConnected) { client.Disconnect(); } try { listeningToChannelPoints = false; pubsubIsConnected = false; pubsub.Disconnect(); } catch { } broadcastSubscription?.Unsubscribe(); }
public void Stop() { if (kernel.Started) { kernel.Stop(); } Unsubscribe(); if (client.IsConnected) { client.Disconnect(); } messageSubscription?.Unsubscribe(); broadcastSubscription?.Unsubscribe(); }
public void Stop() { if (kernel.Started) { kernel.Stop(); } Unsubscribe(); tryToReconnect = false; if (client.IsConnected) { client.Disconnect(); } pubSubManager.Dispose(); broadcastSubscription?.Unsubscribe(); }
public void Stop() { if (kernel.Started) { kernel.Stop(); } client.OnMessageReceived -= OnMessageReceived; client.OnChatCommandReceived -= OnCommandReceived; client.OnUserJoined -= OnUserJoined; client.OnUserLeft -= OnUserLeft; client.OnGiftedSubscription -= OnGiftedSub; client.OnCommunitySubscription -= OnPrimeSub; client.OnNewSubscriber -= OnNewSub; client.OnReSubscriber -= OnReSub; if (client.IsConnected) { client.Disconnect(); } messageSubscription?.Unsubscribe(); broadcastSubscription?.Unsubscribe(); }