-
Bug
-
Resolution: Done
-
Major
-
3.5.0.CR1
-
None
-
None
SseEventSource has option to specify onComplete callback
Javadoc says "onComplete callback is invoked when there are no further events to be received."
Example:
SseEventSource msgEventSource = SseEventSource.target(target).build(); try (SseEventSource eventSource = msgEventSource) { eventSource.register(event -> { // actions on event, this is called }, ex -> { // actions on error, this is called }, () -> { completed.incrementAndGet(); // This is never called }); eventSource.open(); }
SseEventSourceImpl creates ArrayList to for onComplete callbacks, adds onComplete callback to it, but there is no code to run it.
Test: https://github.com/resteasy/Resteasy/pull/1433/files#diff-46bd7bf2136ed3b55bf449e8b0a9ee77R121
- is related to
-
RESTEASY-1680 SSE implementation
- Closed
- relates to
-
RESTEASY-1950 OnComplete callback registered via SseEventSource.register() must be called once
- Resolved