Skip to content

Commit

Permalink
Fix disconnect before connect
Browse files Browse the repository at this point in the history
  • Loading branch information
NaikSoftware committed Jun 26, 2018
1 parent f02fdae commit c17b197
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,12 @@ public void disconnect() {
}

public Completable disconnectCompletable() {
mLifecycleDisposable.dispose();
mMessagesDisposable.dispose();
if (mLifecycleDisposable != null) {
mLifecycleDisposable.dispose();
}
if (mMessagesDisposable != null) {
mMessagesDisposable.dispose();
}
return mConnectionProvider.disconnect()
.doOnComplete(() -> setConnected(false));
}
Expand Down

0 comments on commit c17b197

Please sign in to comment.