Skip to content

Commit 2f10440

Browse files
committed
fix(sse): reject EOF before verified terminal
1 parent 273b8fa commit 2f10440

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/main/java/io/github/easy4j/hermes/api/HermesSseClient.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ public void onClosed(EventSource eventSource) {
347347
scheduleReconnect(subscription, requestFactory, consumer, onComplete,
348348
onError, label, new IOException("SSE stream closed"));
349349
} else {
350-
onComplete.run();
350+
onError.accept(new io.github.easy4j.hermes.api.sse.SseStreamInterruptedException(
351+
"Hermes SSE stream closed before a verified terminal marker: " + label));
351352
finish(subscription);
352353
}
353354
}

0 commit comments

Comments
 (0)