Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19660

SseBroadcaster.onClose() is not called when client connection is closed.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 33.0.0.Final
    • REST
    • None
    • Hide
      1. Browser creates an SSE connection
      2. Connection gets added to an SseBroadcaster.
      3. sseBroadcaster.broadcast() sends data.
      4. Browser closes SSE connection.
      5. Call sseBroadcaster.broadcast again which should result in an IOException being thrown thus causing that specific's SseEventOutputImpl to be closed and thus toClose() to be called from sseBroadcaster which doesnt end up being called.

      Ive repeated calling sseBroadcaster.broadcast() 6 times and have been able to determine that SseEventOutputImpl never detects an IOException from sending to a closed connection.

      The following code generates the log statement "Saw this null" for all broadcasts, including those to closed eventSink's. 

              sseBroadcast.broadcast(event)
                      .whenComplete((v, e) -> {
                          LOG.infov("Saw this \{0}", v);
                      });
      
      Show
      Browser creates an SSE connection Connection gets added to an SseBroadcaster. sseBroadcaster.broadcast() sends data. Browser closes SSE connection. Call sseBroadcaster.broadcast again which should result in an IOException being thrown thus causing that specific's SseEventOutputImpl to be closed and thus toClose() to be called from sseBroadcaster which doesnt end up being called. Ive repeated calling sseBroadcaster.broadcast() 6 times and have been able to determine that SseEventOutputImpl never detects an IOException from sending to a closed connection. The following code generates the log statement "Saw this null" for all broadcasts, including those to closed eventSink's.          sseBroadcast.broadcast(event)                 .whenComplete((v, e) -> {                     LOG.infov( "Saw this \{0}" , v);                 });
    • ---
    • ---

      SseBroadcasterImpl.onClose() is not called when a client closes its connection.

              jperkins-rhn James Perkins
              klambert42 Kevin Lambert
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: