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 | 8284f0b8258501f51c0e23a8307a27d54dd5a886 (patch) | |
tree | fb998446d1cdab73f6e242a54c68690dd115a618 | |
parent | 35b049d4878baa3f30a401d0cf7888fd686cd9e7 (diff) | |
download | prosody-8284f0b8258501f51c0e23a8307a27d54dd5a886.tar.gz prosody-8284f0b8258501f51c0e23a8307a27d54dd5a886.zip |
moduleapi: Don't auto-reload self when already reloading (fixes reload of modules with cyclic dependencies)
-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; |