Skip to content

Commit

Permalink
fix issue Possible memory leak pwittchen#219
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Pushkarev1 committed Aug 31, 2017
1 parent 5e65392 commit c9d1739
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ public class PreLollipopNetworkObservingStrategy implements NetworkObservingStra

context.registerReceiver(receiver, filter);

unsubscribeInUiThread(new Action() {
Disposable disposable = unsubscribeInUiThread(new Action() {
@Override public void run() {
tryToUnregisterReceiver(context, receiver);
}
});
emitter.setDisposable(disposable);
}
}).defaultIfEmpty(Connectivity.create());
}
Expand Down

0 comments on commit c9d1739

Please sign in to comment.