Skip to content

Commit

Permalink
修复httpc timeout的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CandyMi committed Jul 14, 2019
1 parent 9cd1ce9 commit e759935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lualib/httpc/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ local function json(domain, headers, json, timeout)
return code, msg
end

local function file(domain, headers, files, times)
local function file(domain, headers, files, timeout)

local opt, err = splite_protocol(domain)
if not opt then
Expand All @@ -148,7 +148,7 @@ local function file(domain, headers, files, times)

local REQ = build_file_req(opt)

local sock = sock_new():timeout(TIMEOUT or __TIMEOUT__)
local sock = sock_new():timeout(timeout or __TIMEOUT__)
local ok, err = sock_connect(sock, opt.protocol, opt.domain, opt.port)
if not ok then
sock:close()
Expand Down

0 comments on commit e759935

Please sign in to comment.