GetServerAddr() won't crash redbean during init anymore

This commit is contained in:
Leon 2021-11-04 10:35:45 +01:00
parent e5d1536256
commit 3fb6f1711c

View file

@ -3923,6 +3923,7 @@ static int LuaGetAddr(lua_State *L, void GetAddr(uint32_t *, uint16_t *)) {
}
static int LuaGetServerAddr(lua_State *L) {
DontCallFromInitLua(L,"GetServerAddr")
OnlyCallDuringConnection(L, "GetServerAddr");
return LuaGetAddr(L, GetServerAddr);
}