GithubHelp home page GithubHelp logo

Comments (4)

0xGuybrush avatar 0xGuybrush commented on July 28, 2024 1

Just to note, if anyone else comes across this, that I now think the correct way of reusing this in RxJava is to turn it into a ConnectableObservable to allow multiple observables to chain to it and will only dispose when the final downstream Observable disconnects.

I've used .share() here to handle this and seems to be working fine to turn it into a "hot" observable. Closing ticket, as it's due to my knowledge gap rather than an issue here 🙂

from reactivenetwork.

pwittchen avatar pwittchen commented on July 28, 2024

Hi,

Thanks for reporting issue. I suppose this problem may be related to the fact that there is more than one Disposable per from the ReactiveNetwork single Activity and the same objects could reused. Due to this fact, when NetworkCallback is unregistered once, then another one cannot be unregistered because of the same object. I'm not sure about that, but that's my guess.

Regards,
Piotr

from reactivenetwork.

0xGuybrush avatar 0xGuybrush commented on July 28, 2024

Hi Piotr,

thanks for your reply & getting back so quickly.

I have multiple pieces of functionality that depend on network state in some of my activities, so thought the cleanest way was to reuse, but I'll see if I can refactor it though to use a single disposable instead.

Best
Dave

from reactivenetwork.

pwittchen avatar pwittchen commented on July 28, 2024

Great! I'm glad you solved this issue. :)

from reactivenetwork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.