mirror of
https://github.com/brunoos/luasec.git
synced 2024-12-27 04:58:20 +01:00
Problem on Win64, since double does not represent SOCKET_INVALID exactly.
This commit is contained in:
parent
84cb83b92f
commit
f514e9fb1b
@ -837,8 +837,6 @@ LSEC_API int luaopen_ssl_core(lua_State *L)
|
||||
lua_setfield(L, -2, "__index");
|
||||
|
||||
luaL_register(L, "ssl.core", funcs);
|
||||
lua_pushnumber(L, SOCKET_INVALID);
|
||||
lua_setfield(L, -2, "invalidfd");
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -870,8 +868,6 @@ LSEC_API int luaopen_ssl_core(lua_State *L)
|
||||
|
||||
lua_newtable(L);
|
||||
luaL_setfuncs(L, funcs, 0);
|
||||
lua_pushnumber(L, SOCKET_INVALID);
|
||||
lua_setfield(L, -2, "invalidfd");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ function wrap(sock, cfg)
|
||||
local s, msg = core.create(ctx)
|
||||
if s then
|
||||
core.setfd(s, sock:getfd())
|
||||
sock:setfd(core.invalidfd)
|
||||
sock:setfd(-1)
|
||||
registry[s] = ctx
|
||||
return s
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user