diff options
author | Tobias Markmann <tm@ayena.de> | 2009-05-15 17:33:04 +0200 |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2009-05-15 17:33:04 +0200 |
commit | 672ffb89624c3af6badb7354a6bcd9c0d7624e48 (patch) | |
tree | 74f77ffb11e96241a74cbf9136a424b3fe493cf5 /util/events.lua | |
parent | b35bf3760e750fa55ea3ad5d4e97c59ba2eda9a1 (diff) | |
parent | d836e5c09de5c45af4c76cc8cc66458bc0c5deec (diff) | |
download | prosody-672ffb89624c3af6badb7354a6bcd9c0d7624e48.tar.gz prosody-672ffb89624c3af6badb7354a6bcd9c0d7624e48.zip |
Merging SASL buggy client workaround with current tip.
Diffstat (limited to 'util/events.lua')
-rw-r--r-- | util/events.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/events.lua b/util/events.lua index b1f3811c..704d31a4 100644 --- a/util/events.lua +++ b/util/events.lua @@ -53,7 +53,8 @@ function new() if not h then h = {}; handlers[event] = h; end
local dispatcher = function(data)
for _, handler in ipairs(h) do
- handler(data);
+ local ret = handler(data);
+ if ret ~= nil then return ret; end
end
end;
dispatchers[event] = dispatcher;
@@ -66,7 +67,8 @@ function new() local h = handlers[event];
if h then
for _, handler in ipairs(h) do
- handler(data);
+ local ret = handler(data);
+ if ret ~= nil then return ret; end
end
end
end;
|