AP_Scripting: don't throw an exception on out of sockets in accept()
normal lua sockets don't throw an exception on accept, it just returns nil
This commit is contained in:
parent
791a0a3230
commit
a841e9c109
@ -913,7 +913,7 @@ int SocketAPM_accept(lua_State *L) {
|
||||
|
||||
auto *scripting = AP::scripting();
|
||||
if (scripting->num_net_sockets >= SCRIPTING_MAX_NUM_NET_SOCKET) {
|
||||
return luaL_argerror(L, 1, "no sockets available");
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto *sock = ud->accept(0);
|
||||
|
Loading…
Reference in New Issue
Block a user