Code Monkey home page Code Monkey logo

Comments (4)

killemov avatar killemov commented on August 22, 2024

Yes, these functions do call each other, but as far as I can determine the following piece of code in updateTorrents() should prevent calling getErrorData() for torrents that have the errorString set. Barring some rare possible race condition of course.
t.update( torrent );
if( t.error !== 0 && isEmpty( t.errorString ) ) {
eids.push( t.id )
}
Please point out my mistake, if any.

from shift.

Fedyon avatar Fedyon commented on August 22, 2024

Oh yes-ish, you're right! I had those checks disabled locally and forgot about that, sorry...

But, but that piece is preventing almost all errors from notification. In other words, with those checks intact, updateTorrents()->getErrorData() path is actually doing nothing. Even if any went through it, it doesn't make sense: t.errorString is now guaranteed to be Empty, so down the path sendNotification() won't generate any meaningful message. I'm not sure how those supposed to work. I'm confused...

from shift.

killemov avatar killemov commented on August 22, 2024

Oh yes-ish, you're right! I had those checks disabled locally and forgot about that, sorry...

So disabling these conditions actually caused the infinity which caused you to file this issue. Why do this?

But, but that piece is preventing almost all errors from notification. In other words, with those checks intact, updateTorrents()->getErrorData() path is actually doing nothing. Even if any went through it, it doesn't make sense: t.errorString is now guaranteed to be Empty, so down the path sendNotification() won't generate any meaningful message. I'm not sure how those supposed to work. I'm confused...

Please do your research before making these claims. So closing until an actual issue needs to be addressed.

from shift.

Fedyon avatar Fedyon commented on August 22, 2024

Sorry for noises and inconveniences I made, I now realized that in normal circumstances, unmodified sendNotification() is actually just a null func for the time being, because Notification.requestPermission( f ) will never succeed (undefined f). So all the trouble was of mine and just moot.

(as to why: I usually have dom.webnotifications.enabled=false set, so I just added console.log to sendNotification() on sight. Then I found it logging Torrent error. "...": (nothing after :) everytime at opening shift. I naively assumed that those null error should not reach to sendNotification(), and thoughtlessly flipped the logic. It looked okay at that time without errored ones, errors don't happen often, and I forgot about that totally. oops...)

Anyway thanks for your work!

from shift.

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.