mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
udp socket bugfix (#1640)
Co-authored-by: chenkete <kete.chen@centurygame.com>
This commit is contained in:
@@ -648,12 +648,13 @@ ludp(lua_State *L) {
|
||||
host = address_port(L, tmp, addr, 2, &port);
|
||||
}
|
||||
|
||||
int id = skynet_socket_udp(ctx, host, port);
|
||||
int id = skynet_socket_udp(ctx, host, &port);
|
||||
if (id < 0) {
|
||||
return luaL_error(L, "udp init failed");
|
||||
}
|
||||
lua_pushinteger(L, id);
|
||||
return 1;
|
||||
lua_pushinteger(L, port);
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user