Software / code / prosody
Changeset
11507:133e8ed291fe 0.11
mod_c2s: Don't throw errors in async code when connections are gone
Fixes #1507
| author | tmolitor <thilo@eightysoft.de> |
|---|---|
| date | Thu, 18 Mar 2021 14:30:32 +0100 |
| parents | 11407:8d6e013377fa |
| children | 11508:f1abc34414bc |
| files | plugins/mod_c2s.lua |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Sat Feb 27 20:45:45 2021 +0100 +++ b/plugins/mod_c2s.lua Thu Mar 18 14:30:32 2021 +0100 @@ -226,11 +226,11 @@ 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)