From f514e9fb1b7b61763beb6254326bab7ec7b17fd6 Mon Sep 17 00:00:00 2001 From: Bruno Silvestre Date: Wed, 10 Sep 2014 14:41:09 -0300 Subject: [PATCH] Problem on Win64, since double does not represent SOCKET_INVALID exactly. --- src/ssl.c | 4 ---- src/ssl.lua | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index b5591ac..884edc7 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -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; } diff --git a/src/ssl.lua b/src/ssl.lua index 220b8dc..1affb40 100644 --- a/src/ssl.lua +++ b/src/ssl.lua @@ -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