diff options
author | tmolitor <thilo@eightysoft.de> | 2021-03-18 14:30:32 +0100 |
---|---|---|
committer | tmolitor <thilo@eightysoft.de> | 2021-03-18 14:30:32 +0100 |
commit | 2b0c472f871d404852dd50e97868165920a10f9b (patch) | |
tree | 8ad5826cf909df638eea237062a29ced19191439 | |
parent | aa9e2741d5555d7188b7559b3c089f66ca54e528 (diff) | |
download | prosody-2b0c472f871d404852dd50e97868165920a10f9b.tar.gz prosody-2b0c472f871d404852dd50e97868165920a10f9b.zip |
mod_c2s: Don't throw errors in async code when connections are gone
Fixes #1507
-rw-r--r-- | plugins/mod_c2s.lua | 4 |
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) |