Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1752

Duplicate handling of SSE request when client disconnects early on

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.3.Final
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
    • Steps to Reproduce:
      Hide
      1. Start Server app in debug mode
      2. Add breakpoint to org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitterReturnValueHandler:129 //emitter.initialize(handler);
      3. Start Client app
      4. When breakpoint hit then stop Client app
      Show
      Start Server app in debug mode Add breakpoint to org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitterReturnValueHandler:129 //emitter.initialize(handler); Start Client app When breakpoint hit then stop Client app

      Description

      When the client disconnects right upon sending an SSE request
      Then the request might get handled on two threads simultaneously.

      If timeout is set for the SSE emitter (trial.sse.SseResource:30) then the second handler cannot be initialized properly that ends up with a memory leak in Spring.

      If no timeout is set (default constructor in trial.sse.SseResource:30) then both handlers are executed a few times but no resource leak found.

        Gliffy Diagrams

          Attachments

          1. sse.zip
            3 kB
          2. sse-without-timeout.log
            62 kB
          3. sse-with-timeout.log
            29 kB

            Activity

              People

              • Assignee:
                flavia.rainone Flavia Rainone
                Reporter:
                kisgadocsaba Csaba Kis-Gadó
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: