Commit b3f37cdb authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Remove the session even if an error occurs while processing the unavailable presence.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1315 b35dd754-fafc-0310-a699-88a17e54d16e
parent 43bb57e8
......@@ -1015,6 +1015,7 @@ public class SessionManager extends BasicModule {
public void onConnectionClose(Object handback) {
try {
ClientSession session = (ClientSession)handback;
try {
if (session.getPresence().isAvailable()) {
// Send an unavailable presence to the user's subscribers
// Note: This gives us a chance to send an unavailable presence to the
......@@ -1024,9 +1025,12 @@ public class SessionManager extends BasicModule {
presence.setFrom(session.getAddress());
presenceHandler.process(presence);
}
}
finally {
// Remove the session
removeSession(session);
}
}
catch (Exception e) {
// Can't do anything about this problem...
Log.error(LocaleUtils.getLocalizedString("admin.error.close"), e);
......
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