aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_dialback.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua
index c17cbcaf..d7697535 100644
--- a/plugins/mod_dialback.lua
+++ b/plugins/mod_dialback.lua
@@ -55,8 +55,12 @@ add_handler({ "s2sout_unauthed", "s2sout" }, "verify", xmlns_dialback,
log("warn", "dialback for "..(origin.dialback_verifying.from_host or "(unknown)").." failed");
valid = "invalid";
end
- origin.dialback_verifying.sends2s(format("<db:result from='%s' to='%s' id='%s' type='%s'>%s</db:result>",
- attr.from, attr.to, attr.id, valid, origin.dialback_verifying.dialback_key));
+ if not origin.dialback_verifying.sends2s then
+ log("warn", "Incoming s2s session was closed in the meantime, so we can't notify it of the db result");
+ else
+ origin.dialback_verifying.sends2s(format("<db:result from='%s' to='%s' id='%s' type='%s'>%s</db:result>",
+ attr.from, attr.to, attr.id, valid, origin.dialback_verifying.dialback_key));
+ end
end
end);