Comments (4)
While adding a call to close()
in this particular scenario does fix the thread issue, I found some related race conditions in how EventSource was managing state changes ("open" to "closed" vs. "shutdown", etc.), and ended up doing some much-needed cleanup as well as improving test coverage. We should have a patch out within a day or two.
from okhttp-eventsource.
2.3.1 should be available now, and the patch has also been integrated into the latest Java SDK release.
from okhttp-eventsource.
I think you're right - thanks for bringing this to our attention. I'm finding (as you probably did as well) that it's a bit annoying to follow the code paths in this section, and this is a good occasion for us to try to simplify them, which will help to keep this logic more correct in the future. I'm prioritizing this fix and will let you know if the patch is likely to be available soon, or if it ends up taking longer than I'm hoping.
from okhttp-eventsource.
We've released the patch, but it's been taking a long time for the artifact to show up in Maven (as sometimes happens).
from okhttp-eventsource.
Related Issues (20)
- HttpBasic Auth HOT 2
- Default EventSources have a funny Logger Name HOT 3
- Possibility to override default headers HOT 2
- EventSource.restart() throws java.lang.NoClassDefFoundError HOT 2
- android.os.NetworkOnMainThreadException when closing. HOT 2
- Setting log level to BODY deactivates EventHandler HOT 5
- Different header for every reconnect HOT 6
- Dynamically update SSE URL in case of reconnect HOT 6
- [ClassNotFoundException] Didn't find class "java.time.Duration" HOT 4
- Supporting Content-Encoding HOT 2
- jitpack builds failed HOT 3
- how to add security token? HOT 2
- OPEN state but no messages HOT 3
- Already shut downed eventSource its eventHandler's onOpen() method is still called afterwards HOT 2
- Support POST request
- Latest version doesn't connect to the server properly [4.1.0] HOT 4
- Maven dependecy is not get resolved ( Env: Intellij Idea Community Edition HOT 1
- I can't open the doc website http://javadoc.io/doc/com.launchdarkly/okhttp-eventsource HOT 2
- High frequency messages are missed [4.1.1] HOT 3
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 okhttp-eventsource.