public void Stop() { Running = false; socketServer.Stop(); foreach (Bot bot in bots) { bot.Disconnect(); } }
public void OnTimer(object sender, System.Timers.ElapsedEventArgs args) { log.debug(1, "Pollig for information from the System", 109); if (!listenerThread.IsAlive) { Stop(); } try { sd.Poll(); } catch (Exception e) { log.error(e.Message + "\r\n" + e.StackTrace, 5); if (l != null) { l.Stop(); } } }