Giter VIP home page Giter VIP logo

Comments (7)

jacobborisov avatar jacobborisov commented on June 10, 2024 1

I've faced with the similar issue when i try to use this lib to send events for a web browser instead of using the console utility. I've found a possible solution that works in my case.

@osmoC please could you check if it solves your problem? #20 I'm not sure this change is safe and wouldn't broke some other things.

from event-source-library.

guyzmo avatar guyzmo commented on June 10, 2024

well, all I can tell is that this line is being called each time the event receiving callback is triggered (and is the default callback, which is the case for the ping action). So what it means it's that handle_stream() is finishing twice with the same Event object (you can check it by increasing verbosity -v). Basically handle_stream() is there to reconstruct data that has been split in several "datagrams" over the Event Source protocol.

from event-source-library.

guyzmo avatar guyzmo commented on June 10, 2024

@jacobborisov I might be ok with accepting the merge, though I'm not sure why I wrote that comment, but I must have had a good reason to add a note saying that it shall be reset on set() call 😀

Though, when ready the code and where you've put that change, I believe it can make sense, as it's resetting the _ready state just before looping over.

It's sad I did not write any tests then (lack of time, and for my use case, it being hackish was ok) which would help a lot to fix that can of edge cases ☺

from event-source-library.

guyzmo avatar guyzmo commented on June 10, 2024

I'll wait a bit to see if @osmoC can test and approve it's fixing the issue for him as well. And then I'll merge, thanks @jacobborisov !

from event-source-library.

 avatar commented on June 10, 2024

Pardon the delay, been swamped by other stuff. I've tested @jacobborisov fixes:

  • it's indeed fixes both double-events and toro dependency
  • it does not touch buildout.cfg and setup.py

Overall, please merge it, I can re-base my pull request on top of @jacobborisov work and fix minor issues.

Thanks for the great work!

from event-source-library.

guyzmo avatar guyzmo commented on June 10, 2024

ok I'll do just that! Please bear with me a few more days, though.

from event-source-library.

guyzmo avatar guyzmo commented on June 10, 2024

merged!

from event-source-library.

Related Issues (14)

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.