From 794a0778a8191b772bde80774902c5bec6f38fe9 Mon Sep 17 00:00:00 2001 From: batrick Date: Sat, 28 Mar 2009 00:48:49 +0000 Subject: [PATCH] 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. --- nse_main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nse_main.cc b/nse_main.cc index d147a9f45..561dd9f95 100644 --- a/nse_main.cc +++ b/nse_main.cc @@ -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());