Fix. Use weak table as pointer for socket action.

This commit is contained in:
Alexey Melnichuk 2018-07-01 10:40:30 +03:00
parent cf3203eae3
commit c9ed7c6c35

View File

@ -670,8 +670,9 @@ local function wrap_callback(...)
end
local function wrap_socketfunction(self, cb)
local ptr = setmetatable({value = self},{__mode = 'v'})
return function(h, ...)
local e = self._easy[h]
local e = ptr.value._easy[h]
if e then return cb(e, ...) end
return 0
end