Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        public void Stop()
        {
            if (kernel.Started)
            {
                kernel.Stop();
            }
            Unsubscribe();

            if (client.IsConnected)
            {
                client.Disconnect();
            }

            messageSubscription?.Unsubscribe();
            broadcastSubscription?.Unsubscribe();
        }
Exemplo n.º 3
0
        public void Stop()
        {
            if (kernel.Started)
            {
                kernel.Stop();
            }
            Unsubscribe();

            tryToReconnect = false;
            if (client.IsConnected)
            {
                client.Disconnect();
            }

            pubSubManager.Dispose();

            broadcastSubscription?.Unsubscribe();
        }
Exemplo n.º 4
0
        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();
        }