udp socket bugfix (#1640)

Co-authored-by: chenkete <kete.chen@centurygame.com>
This commit is contained in:
CKT
2022-09-03 20:51:19 +08:00
committed by GitHub
parent 01b5d67b11
commit 2a8c095e38
5 changed files with 7 additions and 6 deletions

View File

@@ -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