diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-05-11 18:55:23 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-05-11 18:55:23 +0100 |
commit | 2649a8ec46d7b9e719fee3683011bbccfcd1923c (patch) | |
tree | fb998446d1cdab73f6e242a54c68690dd115a618 /core | |
parent | ab4f2c59496438326b9473cdb5bb878b41561cb4 (diff) | |
download | prosody-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')
-rw-r--r-- | core/moduleapi.lua | 2 |
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; |