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