From 58324429e74a62951e37fcb9034e07066412383b Mon Sep 17 00:00:00 2001 From: Raymond Date: Mon, 6 Sep 2021 20:19:31 -0400 Subject: [PATCH 1/2] formatting --- Dalamud/Game/Gui/ChatGui.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dalamud/Game/Gui/ChatGui.cs b/Dalamud/Game/Gui/ChatGui.cs index c0db1611a..417268589 100644 --- a/Dalamud/Game/Gui/ChatGui.cs +++ b/Dalamud/Game/Gui/ChatGui.cs @@ -390,8 +390,7 @@ namespace Dalamud.Game.Gui if (!FastByteArrayCompare(originalMessageData, message.RawData)) { allocatedString = Service.Get().NewString(message.RawData); - Log.Debug( - $"HandlePrintMessageDetour String modified: {originalMessageData}({messagePtr}) -> {message}({allocatedString.Address})"); + Log.Debug($"HandlePrintMessageDetour String modified: {originalMessageData}({messagePtr}) -> {message}({allocatedString.Address})"); messagePtr = allocatedString.Address; } From 013805c19c0c8bf35c5a01ec735f966a79d51dac Mon Sep 17 00:00:00 2001 From: Raymond Date: Mon, 6 Sep 2021 20:20:59 -0400 Subject: [PATCH 2/2] pluginRepository task exhaustion fix --- Dalamud/Plugin/Internal/PluginRepository.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dalamud/Plugin/Internal/PluginRepository.cs b/Dalamud/Plugin/Internal/PluginRepository.cs index b21f61b51..e05c2dea6 100644 --- a/Dalamud/Plugin/Internal/PluginRepository.cs +++ b/Dalamud/Plugin/Internal/PluginRepository.cs @@ -30,8 +30,7 @@ namespace Dalamud.Plugin.Internal this.IsThirdParty = pluginMasterUrl != DalamudPluginsMasterUrl; this.IsEnabled = isEnabled; - // No need to wait for this - Task.Run(this.ReloadPluginMasterAsync); + this.ReloadPluginMasterAsync(); } /// @@ -73,12 +72,12 @@ namespace Dalamud.Plugin.Internal this.State = PluginRepositoryState.InProgress; this.PluginMaster = new List().AsReadOnly(); - return Task.Run(() => + return Task.Run(async () => { Log.Information($"Fetching repo: {this.PluginMasterUrl}"); using var client = new HttpClient(); - using var response = client.GetAsync(this.PluginMasterUrl).Result; - var data = response.Content.ReadAsStringAsync().Result; + using var response = await client.GetAsync(this.PluginMasterUrl); + var data = await response.Content.ReadAsStringAsync(); var pluginMaster = JsonConvert.DeserializeObject>(data); pluginMaster.Sort((pm1, pm2) => pm1.Name.CompareTo(pm2.Name));