Skip to content

Commit a8aa1d7

Browse files
committed
Review fixes
1 parent d2e7aa1 commit a8aa1d7

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎server-common/src/main/java/io/a2a/server/events/MainEventBusProcessor.java‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,12 @@ private void processEvent(MainEventBusContext context) {
223223
// Skip push notifications for replicated events to avoid duplicate notifications in multi-instance deployments
224224
// Push notifications are sent for all StreamingEventKind events (Task, Message, TaskStatusUpdateEvent, TaskArtifactUpdateEvent)
225225
// per A2A spec section 4.3.3
226-
if (eventToDistribute == event && !isReplicated && event instanceof StreamingEventKind streamingEvent) {
226+
if (!isReplicated && event instanceof StreamingEventKind streamingEvent) {
227227
// Send the streaming event directly - it will be wrapped in StreamResponse format by PushNotificationSender
228228
sendPushNotification(taskId, streamingEvent);
229229
}
230230

231231
// Step 3: Then distribute to ChildQueues (clients see either event or error AFTER persistence attempt)
232-
if (eventToDistribute == null) {
233-
LOGGER.error("MainEventBusProcessor: eventToDistribute is NULL for task {} - this should never happen!", taskId);
234-
eventToDistribute = new InternalError("Internal error: event processing failed");
235-
}
236-
237232
int childCount = mainQueue.getChildCount();
238233
LOGGER.debug("MainEventBusProcessor: Distributing {} to {} children for task {}",
239234
eventToDistribute.getClass().getSimpleName(), childCount, taskId);

0 commit comments

Comments
 (0)