From 1bee6a7e60b4ebb54cb07ea6238e98eeae890559 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Sat, 26 Jul 2003 23:07:43 +0000 Subject: [PATCH] Fixed bug where presence packets lost due to roster being created too late. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1988 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPConnection.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index 3d9e4452d..7c14b0aae 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -309,13 +309,14 @@ public class XMPPConnection { } // We're done with the collector, so explicitly cancel it. collector.cancel(); - // Set presence to online. - packetWriter.sendPacket(new Presence(Presence.Type.AVAILABLE)); - // Finally, create the roster. + // Create the roster. this.roster = new Roster(this); roster.reload(); + // Set presence to online. + packetWriter.sendPacket(new Presence(Presence.Type.AVAILABLE)); + // Indicate that we're now authenticated. authenticated = true;