예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     /// stop
     if (redisPubSub != null)
     {
         logEvent("Stopping LightBot!", true);
         redisPubSub.Stop();
         redisPubSub  = null;
         pubsubThread = null;
         toolStripStatusLabel2.Text = "Disconnected";
     }
 }
예제 #2
0
        public void Stop()
        {
            if (_client != null)
            {
                var results = GetResults();
                Console.WriteLine($"results: {results}");
                Send(CHANNEL_END, $"results are in {results}");

                _client.Dispose();
                _client = null;
            }

            if (_pubSubServer != null)
            {
                _pubSubServer.Stop();
                _pubSubServer.Dispose();
                _pubSubServer = null;
            }

            _values = null;
        }