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

Duplicate handling of SSE request when client disconnects early on

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.1.3.Final
    • Core
    • 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

      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.

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

              flaviarnn Flavia Rainone
              kisgadocsaba Csaba Kis-Gadó (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: