From 6a0d50f4bf5047bb80840e627be150e78a2cda09 Mon Sep 17 00:00:00 2001 From: qJake Date: Wed, 18 Sep 2019 20:05:05 -0500 Subject: [PATCH] Possible fix for #34 not sure --- HADotNet.CommandCenter/Controllers/AdminController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HADotNet.CommandCenter/Controllers/AdminController.cs b/HADotNet.CommandCenter/Controllers/AdminController.cs index 01da2ca..6f63560 100644 --- a/HADotNet.CommandCenter/Controllers/AdminController.cs +++ b/HADotNet.CommandCenter/Controllers/AdminController.cs @@ -249,7 +249,7 @@ public async Task ExportTheme() Response.Headers["Content-Disposition"] = "attachment; filename=hacc-export.theme.json"; Response.Headers["Content-Transfer-Encoding"] = "binary"; await Response.Body.WriteAsync(themeData, 0, themeData.Length); - Response.Body.Flush(); + await Response.Body.FlushAsync(); Logger.LogInformation("Exported theme settings."); @@ -319,7 +319,7 @@ public async Task ExportConfig() Response.Headers["Content-Disposition"] = $"attachment; filename={filename}"; Response.Headers["Content-Transfer-Encoding"] = "binary"; await Response.Body.WriteAsync(configData, 0, configData.Length); - Response.Body.Flush(); + await Response.Body.FlushAsync(); TempData.AddWarning("WARNING: Be careful when importing this file into another HACC instance. If the names of Home Assistant entities are different on the target platform, HACC may experience errors!");