Skip to content

Commit

Permalink
Return ERR_BUSY when in use
Browse files Browse the repository at this point in the history
  • Loading branch information
Swarkin committed Sep 6, 2024
1 parent 5985a2b commit 7c64db3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/awaitable_http_request/awaitable_http_request.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7c64db3

Please sign in to comment.