diff options
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2,10 +2,6 @@ lua_async = { poll_functions = {}, } -if rawget(_G, "require") then - lua_async.socket = require("socket") -end - function lua_async.clock() return lua_async.socket and lua_async.socket.gettime() or os.clock() end @@ -30,7 +26,11 @@ function lua_async.step(dtime) -- close phase is obsolete end -return function(path) +return function(path, no_socket) + if not no_socket then + lua_async.socket = require("socket") + end + for _, f in ipairs { "timeouts", "intervals", |