Software /
code /
prosody
Diff
core/moduleapi.lua @ 4854:dab55c6f7710
moduleapi: Don't auto-reload self when already reloading (fixes reload of modules with cyclic dependencies)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 11 May 2012 18:55:23 +0100 |
parent | 4790:8bf710b19f65 |
child | 4893:98ff89ab5d1d |
line wrap: on
line diff
--- a/core/moduleapi.lua Fri May 11 18:54:17 2012 +0100 +++ b/core/moduleapi.lua Fri May 11 18:55:23 2012 +0100 @@ -112,7 +112,7 @@ 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;