Print a warning when luaL_resourcetryagain force triggers garbage collector
This commit is contained in:
1 parent
971c59bd20
commit
3c5905d6f7
1 file changed
+1
@@ -124,6 +124,7 @@ LUALIB_API int luaL_resourcetryagain (lua_State *L) {
|
||||
#endif
|
||||
|
||||
if (errno == EMFILE || errno == ENFILE || errno == ENOMEM) {
|
||||
CONS_Alert(CONS_WARNING, "%s, force calling lua garbage collector\n", strerror(errno));
|
||||
lua_gc(L, LUA_GCCOLLECT, 0); /* try to release resources with a full GC */
|
||||
return 1; /* signal to try again the creation */
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user