Skip to content

Commit 563a3de

Browse files
authored
Merge pull request #82 from moteus/master
Fix. Lua versino of `multi::add_handle` returns error same as C.
2 parents 8a40510 + 467e15b commit 563a3de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lua/cURL/impl/cURL.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,9 @@ function Multi:add_handle(e)
592592
assert(self._easy.n >= 0)
593593

594594
local h = e:handle()
595-
if self._easy[h] then return self end
595+
if self._easy[h] then
596+
return nil, curl.error(curl.ERROR_MULTI, curl.E_MULTI_ADDED_ALREADY or curl.E_MULTI_BAD_EASY_HANDLE)
597+
end
596598

597599
local ok, err = add_handle(self, h)
598600
if not ok then return nil, err end

0 commit comments

Comments
 (0)