From dad5c6fb6e62bb50cfcf83dab2d055ac191eac0f Mon Sep 17 00:00:00 2001 From: orenda Date: Wed, 8 May 2013 15:00:13 +0300 Subject: [PATCH] Update SocketIOClient.java --- src/com/codebutler/android_websockets/SocketIOClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/codebutler/android_websockets/SocketIOClient.java b/src/com/codebutler/android_websockets/SocketIOClient.java index 21e2593..a16464a 100644 --- a/src/com/codebutler/android_websockets/SocketIOClient.java +++ b/src/com/codebutler/android_websockets/SocketIOClient.java @@ -250,7 +250,8 @@ public void disconnect() throws IOException { } private void cleanup() { - mClient.disconnect(); + if (mClient != null) + mClient.disconnect(); mClient = null; mSendLooper.quit();