-
Bug
-
Resolution: Done
-
Major
-
4.5.6.Final
-
None
Wrong operation sequence in SseEventOutputImpl
original bug - https://github.com/quarkusio/quarkus/issues/11824
SseEventOutputImpl.java:292
CompletionStage<Void> a = internalFlushResponseToClient(true); CompletionStage<Void> b = writeEvent(event); return a.thenCompose(v -> b);
for correct operation and initialization order it should be like this:
return internalFlushResponseToClient(true) .thenCompose(v -> writeEvent(event));
SseEventOutputImpl.java:233
CompletionStage<Void> a = aos.asyncWrite(SseConstants.DOUBLE_EOL); CompletionStage<Void> b = aos.asyncFlush();
should be
CompletionStage<Void> a = aos.asyncWrite(SseConstants.DOUBLE_EOL)
.thenCompose(v -> aos.asyncFlush());
SseEventOutputImpl.java:349
CompletionStage<Void> a = aos.asyncWrite(bout.toByteArray()); CompletionStage<Void> b = aos.asyncFlush();
should be
return aos.asyncWrite(bout.toByteArray())
.thenCompose(v -> aos.asyncFlush())
......