private static void ShutdownRedisSentinelsAndServers() { log.Debug("Shutting down all Sentinels..."); foreach (var host in SentinelHosts) { try { var client = new RedisClient(host) { ConnectTimeout = 100, ReceiveTimeout = 100, }; client.ShutdownNoSave(); } catch (Exception ex) { log.Error("Error trying to shutdown {0}".Fmt(host), ex); } } log.Debug("Shutting down all Redis Servers..."); foreach (var port in RedisPorts) { try { var client = new RedisClient("127.0.0.1", port) { ConnectTimeout = 100, ReceiveTimeout = 100, }; client.ShutdownNoSave(); } catch (Exception ex) { "Error trying to shutdown {0}".Print(port); ex.Message.Print(); } } }