Skip to content

Commit a998181

Browse files
committed
added ping_interval keyword
1 parent 027ce12 commit a998181

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

litestar/response/sse.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def __init__(
141141
retry_duration: int | None = None,
142142
comment_message: str | None = None,
143143
status_code: int | None = None,
144+
ping_interval: int | None = None,
144145
) -> None:
145146
"""Initialize the response.
146147
@@ -159,6 +160,7 @@ def __init__(
159160
event_id: The event ID. This sets the event source's 'last event id'.
160161
retry_duration: Retry duration in milliseconds.
161162
comment_message: A comment message. This value is ignored by clients and is used mostly for pinging.
163+
ping_interval:
162164
"""
163165
super().__init__(
164166
content=_ServerSentEventIterator(
@@ -174,6 +176,7 @@ def __init__(
174176
encoding=encoding,
175177
headers=headers,
176178
status_code=status_code,
179+
ping_interval=ping_interval,
177180
)
178181
self.headers.setdefault("Cache-Control", "no-cache")
179182
self.headers["Connection"] = "keep-alive"

0 commit comments

Comments
 (0)