Commit 1b4da143 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

1) Close all active sessions when cancelling account. JM-1085

2) Return a <not-authorized/> stream error when cancelling account. JM-1085

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8547 b35dd754-fafc-0310-a699-88a17e54d16e
parent 069d10fd
......@@ -37,6 +37,7 @@ import org.jivesoftware.util.Log;
import org.xmpp.packet.IQ;
import org.xmpp.packet.JID;
import org.xmpp.packet.PacketError;
import org.xmpp.packet.StreamError;
import java.util.ArrayList;
import java.util.Iterator;
......@@ -236,7 +237,12 @@ public class IQRegisterHandler extends IQHandler implements ServerFeaturesProvid
// Take a quick nap so that the client can process the result
Thread.sleep(10);
// Close the user's connection
session.close();
final StreamError error = new StreamError(StreamError.Condition.not_authorized);
for (ClientSession sess : sessionManager.getSessions(user.getUsername()) )
{
sess.deliverRawText(error.toXML());
sess.close();
}
// The reply has been sent so clean up the variable
reply = null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment