Просмотр исходного кода

FIX: prosody: destroy_request check

master
Aaron van Meerten 5 лет назад
Родитель
Сommit
f14a595462
1 измененных файлов: 4 добавлений и 3 удалений
  1. 4
    3
      resources/prosody-plugins/token/util.lib.lua

+ 4
- 3
resources/prosody-plugins/token/util.lib.lua Просмотреть файл

142
             -- TODO: This check is racey. Not likely to be a problem, but we should
142
             -- TODO: This check is racey. Not likely to be a problem, but we should
143
             --       still stick a mutex on content / code at some point.
143
             --       still stick a mutex on content / code at some point.
144
             if code == nil then
144
             if code == nil then
145
-                -- no longer works in prosody 0.11
146
-                -- @TODO: work with prosody devs to determine better timeout mechanism for timing out active http requests
147
-                -- http.destroy_request(request);
145
+                -- no longer present in prosody 0.11, so cehck before calling
146
+                if http.destroy_request ~= nil then
147
+                    http.destroy_request(request);
148
+                end
148
                 done();
149
                 done();
149
             end
150
             end
150
         end
151
         end

Загрузка…
Отмена
Сохранить