Merge pull request #90 from moteus/master

Fix. `setopt_socketfunction` function
This commit is contained in:
Alexey Melnichuk 2017-02-09 15:00:03 +03:00 committed by GitHub
commit bee2a9d2cc
2 changed files with 5 additions and 3 deletions

View File

@ -175,9 +175,11 @@ on_curl_timeout = function(ms)
-- calls by curl -- -- calls by curl --
trace("CURL::TIMEOUT", ms) 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 end
on_curl_action = function(easy, fd, action) on_curl_action = function(easy, fd, action)

View File

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