Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unserialized access to connectivitySubject in MarshmallowNetworkObservingStrategy #313

Closed
aperfilyev opened this issue Nov 23, 2018 · 1 comment

Comments

@aperfilyev
Copy link
Contributor

Basically, android.net.ConnectivityManager.NetworkCallback is invoked on android.net.ConnectivityThread by default and android.content.BroadcastReceiver#onReceive from idle mode is invoked on the main thread.

From RxJava doc:

Calling onNext(Object), onError(Throwable) and onComplete() is required to be serialized (called from the same thread or called non-overlappingly from different threads through external means of serialization). The toSerialized() method available to all Subjects provides such serialization and also protects against reentrance (i.e., when a downstream Observer consuming this subject also wants to call onNext(Object) on this subject recursively).

@pwittchen
Copy link
Owner

Hi,

Thanks for reporting that. I'll have a look at it.

Regards,
Piotr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants