Fix. `setopt_socketfunction` function

master
Alexey Melnichuk 2017-02-09 14:27:26 +03:00
parent cc737deef8
commit f8a96ddcce
2 changed files with 5 additions and 3 deletions

View File

@ -175,9 +175,11 @@ on_curl_timeout = function(ms)
-- calls by curl --
trace("CURL::TIMEOUT", ms)
if ms <= 0 then ms = 1 end
if not timer:active() then
if ms <= 0 then ms = 1 end
timer:start(ms, 0, on_libuv_timeout)
timer:start(ms, 0, on_libuv_timeout)
end
end
on_curl_action = function(easy, fd, action)

View File

@ -661,7 +661,7 @@ local setopt_socketfunction = wrap_function("setopt_socketfunction")
function Multi:setopt_socketfunction(...)
local cb = wrap_callback(...)
return setopt_socketfunction(wrap_socketfunction(self, cb))
return setopt_socketfunction(self, wrap_socketfunction(self, cb))
end
local setopt = wrap_function("setopt")