Skip to content

Commit

Permalink
fix http timeout not being applied
Browse files Browse the repository at this point in the history
  • Loading branch information
Sledmine committed Apr 4, 2023
1 parent af40a55 commit 7a650b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

# 3.4.0
- Fixed HTTP request timeout not being applied because of an override by another HTTP client
- Add `--template` flag to `build` command, this will create a template of a buildspec.yaml file in the current directory
- Fixed multiple exit codes in different commands (install, update, remove, luabundle, build)

# 3.3.0
- Fixed multi scenario building using `build` command
- Expanded HTTP request timeout to 5000 milliseconds, improving downloading stability
Expand Down
6 changes: 3 additions & 3 deletions modules/fdownload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
local socket = require "socket"
local http = require "socket.http"
local https = require "socket.https"
local timeout = 5000
http.timeout = timeout
https.timeout = timeout
local timeout = 60
local ftp = require "socket.ftp"
local url = require "socket.url"
local ltn12 = require "ltn12"
Expand Down Expand Up @@ -139,6 +137,7 @@ function getbyhttps(u, file)
else
save = redirect
end
https.TIMEOUT = timeout
local r, c, h, s = https.request {
url = u,
sink = save
Expand All @@ -162,6 +161,7 @@ function getbyhttp(u, file)
else
save = redirect
end
http.TIMEOUT = timeout
local r, c, h, s = http.request {
url = u,
sink = save
Expand Down

0 comments on commit 7a650b4

Please sign in to comment.