Skip to content

Commit

Permalink
Omit unnecessary explicit event type from SSE stream. This improves c…
Browse files Browse the repository at this point in the history
…ompatiblity with front end clients.
  • Loading branch information
bertrik committed Jul 21, 2024
1 parent deaaccb commit c8772af
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void getTrafficEvents(@Context Sse sse, @Context SseEventSink sseEventSin
if (measurement != null) {
String id = String.valueOf(measurement.dateTime.getEpochSecond() / 60);
String json = mapper.writeValueAsString(new MeasurementResult(measurement));
OutboundSseEvent event = sse.newEventBuilder().id(id).name("measurement").data(json).build();
OutboundSseEvent event = sse.newEventBuilder().id(id).data(json).build();
sseEventSink.send(event);
}
}
Expand Down

0 comments on commit c8772af

Please sign in to comment.