Fix async context handling in blob config loading

Added ConfigureAwait(false) to async HTTP call and moved Compile() invocation to immediately after deserialization. This improves async context handling and ensures blob config is compiled before assignment.
This commit is contained in:
Namhyeon Go 2025-08-17 21:22:17 +09:00
parent 6896c272ef
commit d0c031fe32

View File

@ -442,14 +442,14 @@ namespace WelsonJS.Launcher
return;
}
using (var response = await _httpClient.GetStreamAsync(url))
using (var response = await _httpClient.GetStreamAsync(url).ConfigureAwait(false))
using (var reader = new StreamReader(response))
{
var serializer = new XmlSerializer(typeof(BlobConfig));
_blobConfig = (BlobConfig)serializer.Deserialize(reader);
var cfg = (BlobConfig)serializer.Deserialize(reader);
cfg?.Compile();
_blobConfig = cfg;
}
_blobConfig?.Compile();
}
catch (Exception ex)
{