From fc877f09cbe4338fa71086dd263cc8ad475487b0 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 11 Sep 2026 21:19:13 +0300 Subject: [PATCH] add 'timeout_ms' to network.request --- src/logic/scripting/lua/libs/libnetwork.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/logic/scripting/lua/libs/libnetwork.cpp b/src/logic/scripting/lua/libs/libnetwork.cpp index d8c9e7c98..577eee7a9 100644 --- a/src/logic/scripting/lua/libs/libnetwork.cpp +++ b/src/logic/scripting/lua/libs/libnetwork.cpp @@ -109,6 +109,10 @@ static int l_request(lua::State* L, network::Network& network) { request.followLocation = lua::toboolean(L, -1); lua::pop(L); } + if (lua::getfield(L, "timeout_ms", 2)) { + request.timeoutMs = lua::tointeger(L, -1); + lua::pop(L); + } int currentRequestId = request_id++; request.onResponse = [currentRequestId](std::vector bytes) {