From 7c64db334bbf140a8d329e7edbece63540df8485 Mon Sep 17 00:00:00 2001 From: nanachi <102416174+Swarkin@users.noreply.github.com> Date: Fri, 6 Sep 2024 19:14:40 +0200 Subject: [PATCH] Return ERR_BUSY when in use --- addons/awaitable_http_request/awaitable_http_request.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/awaitable_http_request/awaitable_http_request.gd b/addons/awaitable_http_request/awaitable_http_request.gd index 4703261..a236f11 100644 --- a/addons/awaitable_http_request/awaitable_http_request.gd +++ b/addons/awaitable_http_request/awaitable_http_request.gd @@ -26,8 +26,8 @@ var is_requesting := false ## Whether the node is busy performing a request. Th ## [/codeblock] func async_request(url: String, custom_headers := PackedStringArray(), method := HTTPClient.Method.METHOD_GET, request_data := "") -> HTTPResult: if is_requesting: - push_error("AwaitableHTTPRequest is busy performing a request.") - return + push_warning("AwaitableHTTPRequest is busy performing a request.") + return HTTPResult._from_error(Error.ERR_BUSY) is_requesting = true