Comments (7)
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.
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.
@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.
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.
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.
ok I'll do just that! Please bear with me a few more days, though.
from event-source-library.
merged!
from event-source-library.
Related Issues (14)
- 'token' and 'action' parameters HOT 1
- Support of Tornado >3 HOT 10
- Max number of connections HOT 2
- update documentation HOT 6
- confusing error on port mismatch HOT 3
- wildcard events HOT 2
- integration clarification HOT 7
- Issue with 'libcurl' while running client side code HOT 1
- EventSourceClient interface is awkward HOT 3
- traceback is not imported in listener.py HOT 2
- "import json" used instead of "from tornado.escape import json_encode, json_decode" HOT 2
- listener.py:EventSourceHandler:_event_loop() performance issue HOT 6
- removal of buffer_events()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from event-source-library.