Similarly to /nmap-exp/patrick/nse-lua-merge:

Changed the garbage collection cycle after all threads in running are run
from a step to a full collection cycle. It can take quite a few steps before
sockets are finally collected so other threads may finish making a connection.
This commit is contained in:
batrick 2009-03-28 00:48:49 +00:00
parent e9d7cab6ef
commit 794a0778a8

View file

@ -501,7 +501,7 @@ int process_mainloop(lua_State *L) {
}
// Run the garbage collecter. FIXME: This can error in a __gc metamethod
lua_gc(L, LUA_GCSTEP, 5);
lua_gc(L, LUA_GC_COLLECT, 0);
while (!running_scripts.empty()) {
current = *(running_scripts.begin());