private static void SrtWorkerThread(SrtReceiver client) { while (!_pendingExit) { client.Run(); Console.WriteLine("\nConnection closed, resetting..."); Thread.Sleep(100); } Environment.Exit(0); }