aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authortmolitor <thilo@eightysoft.de>2021-03-18 14:30:32 +0100
committertmolitor <thilo@eightysoft.de>2021-03-18 14:30:32 +0100
commit2b0c472f871d404852dd50e97868165920a10f9b (patch)
tree8ad5826cf909df638eea237062a29ced19191439 /plugins
parentaa9e2741d5555d7188b7559b3c089f66ca54e528 (diff)
downloadprosody-2b0c472f871d404852dd50e97868165920a10f9b.tar.gz
prosody-2b0c472f871d404852dd50e97868165920a10f9b.zip
mod_c2s: Don't throw errors in async code when connections are gone
Fixes #1507
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_c2s.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index c648850f..f8675258 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -226,11 +226,11 @@ module:hook_global("user-password-changed", function(event)
end, 200);
function runner_callbacks:ready()
- self.data.conn:resume();
+ if self.data["conn"] ~= nil then self.data.conn:resume(); end
end
function runner_callbacks:waiting()
- self.data.conn:pause();
+ if self.data["conn"] ~= nil then self.data.conn:pause(); end
end
function runner_callbacks:error(err)