aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-06-25 13:53:17 +0100
committerMatthew Wild <mwild1@gmail.com>2018-06-25 13:53:17 +0100
commit269d98209c96d9aa7715198d9d5fed720be751c0 (patch)
treef25041ad436171a45cf43b1afee20f5b878f8d5c /util
parent6d2a2e9153b575a02f7d501888335df9e4af0578 (diff)
downloadprosody-269d98209c96d9aa7715198d9d5fed720be751c0.tar.gz
prosody-269d98209c96d9aa7715198d9d5fed720be751c0.zip
util.async: Copy hooks from main thread into coroutines
Diffstat (limited to 'util')
-rw-r--r--util/async.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/async.lua b/util/async.lua
index 46a64ecb..0d19af6e 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -126,6 +126,7 @@ local function runner_create_thread(func, self)
func(coroutine.yield("ready", self));
end
end);
+ debug.sethook(thread, debug.gethook());
assert(coroutine.resume(thread, self)); -- Start it up, it will return instantly to wait for the first input
return thread;
end