Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.5.3.Final
    • Fix Version/s: 4.5.5.Final
    • Component/s: None
    • Labels:
      None

      Description

      Before the servlet dispatched the sse GET method in one thread like below code example, sse event sending to SseEventSink with POST method is already started in another thread.

      @GET
       @Produces(MediaType.SERVER_SENT_EVENTS)
       public void getEvents(@Context SseEventSink eventSink)
            this.eventSink = eventSink;
        }
       @POST
       public void send(String message) {
              ....
              sseSink.send(sseEvent);
       }
      
      

      The sequence like this:

      1353510:12:48,696 ERROR [io.undertow.request] (default task-3) UT005080: HttpServerExchange cannot have both async IO resumed and dispatch() called in the same cycle
      1353610:12:48,704 ERROR [io.undertow.request] (default task-3) UT005071: Undertow request failed HttpServerExchange{ GET /SseAPITest/apitest/events}: java.lang.IllegalStateException: UT000002: The response has already been started
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jim.ma Jim Ma
                  Reporter:
                  jim.ma Jim Ma
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: