From f14a59546237157d1a9f82c58b969a5cbc598f9f Mon Sep 17 00:00:00 2001 From: Aaron van Meerten Date: Fri, 7 Aug 2020 13:15:55 -0500 Subject: [PATCH] FIX: prosody: destroy_request check --- resources/prosody-plugins/token/util.lib.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/prosody-plugins/token/util.lib.lua b/resources/prosody-plugins/token/util.lib.lua index cfb188b2a..8473cac82 100644 --- a/resources/prosody-plugins/token/util.lib.lua +++ b/resources/prosody-plugins/token/util.lib.lua @@ -142,9 +142,10 @@ function Util:get_public_key(keyId) -- TODO: This check is racey. Not likely to be a problem, but we should -- still stick a mutex on content / code at some point. if code == nil then - -- no longer works in prosody 0.11 - -- @TODO: work with prosody devs to determine better timeout mechanism for timing out active http requests - -- http.destroy_request(request); + -- no longer present in prosody 0.11, so cehck before calling + if http.destroy_request ~= nil then + http.destroy_request(request); + end done(); end end