elide retry if default (#578)

This commit is contained in:
Johnathan Stevers 2025-02-02 21:19:32 -06:00 committed by GitHub
parent 38c0547dfa
commit 1d8105af11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,9 @@ fn send(
try self.writer.print("id: {s}\n", .{id});
}
try self.writer.print("retry: {d}\n", .{options.retry_duration});
if (options.retry_duration != consts.default_sse_retry_duration) {
try self.writer.print("retry: {d}\n", .{options.retry_duration});
}
for (data) |line| {
try self.writer.print("data: {s}\n", .{line});