xmppserver_listener: When a connection fails, pass the reason to destroy_session
authorMatthew Wild <mwild1@gmail.com>
Thu, 17 Dec 2009 19:00:36 +0000 (19:00 +0000)
committerMatthew Wild <mwild1@gmail.com>
Thu, 17 Dec 2009 19:00:36 +0000 (19:00 +0000)
net/xmppserver_listener.lua

index 37f2470c20317ec9f30f4aadf7219e74c00a9c1a..4394eac50ededa17fb2fa3546a64b362d0136fee 100644 (file)
@@ -159,7 +159,7 @@ function xmppserver.disconnect(conn, err)
                        end
                end
                (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err));
                        end
                end
                (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err));
-               s2s_destroy_session(session);
+               s2s_destroy_session(session, err);
                sessions[conn]  = nil;
                session = nil;
                collectgarbage("collect");
                sessions[conn]  = nil;
                session = nil;
                collectgarbage("collect");