aboutsummaryrefslogtreecommitdiffstats
path: root/util/promise.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-07-08 02:44:32 +0200
committerKim Alvefur <zash@zash.se>2019-07-08 02:44:32 +0200
commitf1406ebe53dd38003cd1fd3121946ae4924de03c (patch)
tree6b13265c066c8c32f4ed5d44fc9ca8421d118d06 /util/promise.lua
parent5399b9b9057f8202ceb25e933d10e1825383bc99 (diff)
parent37fc8f2a2fdaac95d7aee6e51b88514f3febef31 (diff)
downloadprosody-f1406ebe53dd38003cd1fd3121946ae4924de03c.tar.gz
prosody-f1406ebe53dd38003cd1fd3121946ae4924de03c.zip
Merge 0.11->trunk
Diffstat (limited to 'util/promise.lua')
-rw-r--r--util/promise.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/promise.lua b/util/promise.lua
index 07c9c4dc..0b182b54 100644
--- a/util/promise.lua
+++ b/util/promise.lua
@@ -49,6 +49,9 @@ local function promise_settle(promise, new_state, new_next, cbs, value)
for _, cb in ipairs(cbs) do
cb(value);
end
+ -- No need to keep references to callbacks
+ promise._pending_on_fulfilled = nil;
+ promise._pending_on_rejected = nil;
return true;
end