eclipse-ee4j / eclipse-ee4j/jersey

Do not block EventSource until first data chunk is received

Open
#3,311 3 comments 0 reactions 0 assignees View on GitHub
Priority: Major Type: Improvement
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

...
WebTarget target = client.target(uri);
EventSource client2es = new EventSource(target)
...

the last line blocks until the server sents the first chunk of data "awaitFirstContact()".

As all other data processing is also done asynchronously, it would be obvious to add a parameter to "open()" that specifies whether the first event is awaited or not.
#### Affected Versions
[2.22.1]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.