Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7874

JAX-RS SSE Leaking SSESink (s)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.6
    • 3.2.7, 3.3.0
    • JAX-RS
    • None
    • Observed on karaf (jetty).
      Reproduced on jetty by modifying cxf SSE tests.

    • Unknown

    Description

      Closing of SSE connection by client is not detected and handled on the server part.
      This results in server leaking resources when it is the clients responsibility for deciding on the lifetime of SSE connection.

      My particular scenario is:
      Status notifications for devices manged by the server are sent to the client (browser), this is a continues stream. That stream lives until browser tab/window is closed, which results in client closing the underlying SSE connection.
      SseSinkImpl is not informed of connection being closed.
      At the same time the exception set in org.apache.cxf.jaxrs.sse.SseEventSinkImpl#dequeue

      future.completeExceptionally(ex);

      in case of channel being closed is not acted upon internally within SseSinkImpl.

      Attachments

        1. cxf-7874.reproduce.patch
          5 kB
          Lukasz Wysocki

        Activity

          People

            reta Andriy Redko
            LWysocki Lukasz Wysocki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: