projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge Tobias's fancy SASL branch->trunk
[prosody.git]
/
util
/
timer.lua
diff --git
a/util/timer.lua
b/util/timer.lua
index c52d9c68bb2ff81e2d093f9d55a0e6a3baa10f47..fa1dd7c54cadde12e4bac4aa8a23304ba167bc96 100644
(file)
--- a/
util/timer.lua
+++ b/
util/timer.lua
@@
-1,6
+1,6
@@
-- Prosody IM
-- Prosody IM
--- Copyright (C) 2008-20
09
Matthew Wild
--- Copyright (C) 2008-20
09
Waqas Hussain
+-- Copyright (C) 2008-20
10
Matthew Wild
+-- Copyright (C) 2008-20
10
Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
@@
-55,11
+55,12
@@
if not event then
else
local EVENT_LEAVE = (event.core and event.core.LEAVE) or -1;
function _add_task(delay, func)
else
local EVENT_LEAVE = (event.core and event.core.LEAVE) or -1;
function _add_task(delay, func)
- event_base:addevent(nil, 0, function ()
+ local event_handle;
+ event_handle = event_base:addevent(nil, 0, function ()
local ret = func();
if ret then
return 0, ret;
local ret = func();
if ret then
return 0, ret;
- else
+ else
if event_handle then
return EVENT_LEAVE;
end
end
return EVENT_LEAVE;
end
end