mirror of
https://github.com/brunoos/luasec.git
synced 2024-11-08 06:28:26 +01:00
proper socket invalidation #70
This commit is contained in:
parent
67a2133e7d
commit
9f6d623ccb
@ -848,5 +848,9 @@ LSEC_API int luaopen_ssl_core(lua_State *L)
|
||||
|
||||
luaL_newlib(L, funcs);
|
||||
|
||||
lua_pushstring(L, "SOCKET_INVALID");
|
||||
lua_pushnumber(L, SOCKET_INVALID);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ local function wrap(sock, cfg)
|
||||
local s, msg = core.create(ctx)
|
||||
if s then
|
||||
core.setfd(s, sock:getfd())
|
||||
sock:setfd(-1)
|
||||
sock:setfd(core.SOCKET_INVALID)
|
||||
registry[s] = ctx
|
||||
return s
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user