mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'timeout_ms' to network.request
This commit is contained in:
parent
a5f9eafe23
commit
fc877f09cb
1 changed files with 4 additions and 0 deletions
|
|
@ -109,6 +109,10 @@ static int l_request(lua::State* L, network::Network& network) {
|
||||||
request.followLocation = lua::toboolean(L, -1);
|
request.followLocation = lua::toboolean(L, -1);
|
||||||
lua::pop(L);
|
lua::pop(L);
|
||||||
}
|
}
|
||||||
|
if (lua::getfield(L, "timeout_ms", 2)) {
|
||||||
|
request.timeoutMs = lua::tointeger(L, -1);
|
||||||
|
lua::pop(L);
|
||||||
|
}
|
||||||
|
|
||||||
int currentRequestId = request_id++;
|
int currentRequestId = request_id++;
|
||||||
request.onResponse = [currentRequestId](std::vector<char> bytes) {
|
request.onResponse = [currentRequestId](std::vector<char> bytes) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue