aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-05-11 18:55:23 +0100
committerMatthew Wild <mwild1@gmail.com>2012-05-11 18:55:23 +0100
commit2649a8ec46d7b9e719fee3683011bbccfcd1923c (patch)
treefb998446d1cdab73f6e242a54c68690dd115a618 /core/moduleapi.lua
parentab4f2c59496438326b9473cdb5bb878b41561cb4 (diff)
downloadprosody-2649a8ec46d7b9e719fee3683011bbccfcd1923c.tar.gz
prosody-2649a8ec46d7b9e719fee3683011bbccfcd1923c.zip
moduleapi: Don't auto-reload self when already reloading (fixes reload of modules with cyclic dependencies)
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 57367255..44c84de1 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -112,7 +112,7 @@ function api:depends(name)
if not self.dependencies then
self.dependencies = {};
self:hook("module-reloaded", function (event)
- if self.dependencies[event.module] then
+ if self.dependencies[event.module] and not self.reloading then
self:log("info", "Auto-reloading due to reload of %s:%s", event.host, event.module);
modulemanager.reload(self.host, self.name);
return;