Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Commit

Permalink
Problem on Win64, since double does not represent SOCKET_INVALID exac…
Browse files Browse the repository at this point in the history
…tly.
  • Loading branch information
brunoos committed Sep 10, 2014
1 parent 84cb83b commit f514e9f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ssl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f514e9f

Please sign in to comment.