From 761c52771a80c3dd331ce4bc2da8c6490f118932 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 19 Nov 2008 21:07:40 +0000 Subject: Don't error if the original s2s connection has closed before we get the dialback result --- plugins/mod_dialback.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins') 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("%s", - 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("%s", + attr.from, attr.to, attr.id, valid, origin.dialback_verifying.dialback_key)); + end end end); -- cgit v1.2.3