From aa92ee9942a4f1500851e6a12bbc84c91f1e1a6e Mon Sep 17 00:00:00 2001 From: Derek DeMoro Date: Wed, 15 Nov 2006 22:33:48 +0000 Subject: [PATCH] Minor update to reconnection logic. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@6123 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/ReconnectionManager.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/org/jivesoftware/smack/ReconnectionManager.java b/source/org/jivesoftware/smack/ReconnectionManager.java index 835f2169d..ad4dc08b4 100644 --- a/source/org/jivesoftware/smack/ReconnectionManager.java +++ b/source/org/jivesoftware/smack/ReconnectionManager.java @@ -223,10 +223,14 @@ public class ReconnectionManager implements ConnectionListener { if (e instanceof XMPPException) { XMPPException xmppEx = (XMPPException) e; StreamError error = xmppEx.getStreamError(); - String reason = error.getCode(); - if ("conflict".equals(reason)) { - return; + // Make sure the error is not null + if (error != null) { + String reason = error.getCode(); + + if ("conflict".equals(reason)) { + return; + } } }