From fd52b7386a6adf06477a984f35fbf2b6eec4c8b6 Mon Sep 17 00:00:00 2001 From: Kaiden Date: Thu, 22 Aug 2024 08:11:58 +0000 Subject: [PATCH] Fixed recursion when using GetData syncronously (!161) Running [SPT.Common.Http.RequestHandler.GetData()](https://dev.sp-tarkov.com/SPT/Modules/src/commit/af1a83fe718df499804a017b05f1fa6b6a88d20a/project/SPT.Common/Http/RequestHandler.cs#L78) would run indefinitely because of an accidental recursion. Reviewed-on: https://dev.sp-tarkov.com/SPT/Modules/pulls/161 Co-authored-by: Kaiden Co-committed-by: Kaiden (cherry picked from commit ab9d9c0e1386e3bf624afe926131c53f67e386aa) --- project/SPT.Common/Http/RequestHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/SPT.Common/Http/RequestHandler.cs b/project/SPT.Common/Http/RequestHandler.cs index 655a0f6..a12ee0a 100644 --- a/project/SPT.Common/Http/RequestHandler.cs +++ b/project/SPT.Common/Http/RequestHandler.cs @@ -75,7 +75,7 @@ namespace SPT.Common.Http public static byte[] GetData(string path) { - return Task.Run(() => GetData(path)).Result; + return Task.Run(() => GetDataAsync(path)).Result; } public static async Task GetJsonAsync(string path)