[
https://issues.apache.org/jira/browse/CXF-7804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550755#comment-16550755
]
Andriy Redko commented on CXF-7804:
-----------------------------------
That's true, went missing during the refactorings, thanjs [~LWysocki]!
> SSE SseBroadcaster implementation not performing onClose / onError callbacks
> ----------------------------------------------------------------------------
>
> Key: CXF-7804
> URL: https://issues.apache.org/jira/browse/CXF-7804
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.2.5
> Reporter: Lukasz Wysocki
> Priority: Major
>
> The class {{org.apache.cxf.jaxrs.sse.SseBroadcasterImpl}} does not uphold the
> contract stated in {{javax.ws.rs.sse.SseBroadcaster}} interface.
> The registered {{onError}} and {{onClose}} callbacks are not called when
> {{SseEventSink}} is closed or there is an communication error/timeout.
> It seems the problem can be pinpointed to anonymous implementation of
> {{AsyncListener}} registered in {{AsyncContext}} from
> {{SseBroadcasterImpl.register}} method (GitHub link
> [HERE|https://github.com/apache/cxf/blob/8eab54c2a285ac91b0a04b8cd7e899d45f15b73a/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/SseBroadcasterImpl.java#L55]).
> Seems like extending the {{onComplete}} and {{onTimeout}}/{{onError}} methods
> to do additional calls to {{closers.forEach}} and {{exceptioners.forEach}}
> might solve this.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)