Skip to content

Commit 54f563a

Browse files
committed
fix(sse): small improvement to handling server-sent events
1 parent 8c7b70a commit 54f563a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/increase/_base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def _process_response_data(
626626

627627
def _process_stream_line(self, contents: str) -> str:
628628
"""Pre-process an indiviudal line from a streaming response"""
629-
if contents == "data: [DONE]\n":
629+
if contents.startswith("data: [DONE]"):
630630
raise StopStreaming()
631631

632632
if contents.startswith("data: "):

0 commit comments

Comments
 (0)