File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def __init__(
5353 is_head_response : bool = False ,
5454 media_type : MediaType | str | None = None ,
5555 status_code : int | None = None ,
56- timeout : int | None = None ,
56+ timeout : int | None = 0 ,
5757 ) -> None :
5858 """A low-level ASGI streaming response.
5959
@@ -127,7 +127,7 @@ async def _stream(self, send: Send) -> None:
127127 Returns:
128128 None
129129 """
130- if self .timeout is not None :
130+ if self .timeout :
131131 await self ._stream_with_timeout_events (send )
132132 else :
133133 async for chunk in self .iterator :
@@ -165,6 +165,7 @@ async def _stream_with_timeout_events(self, send: Send) -> None:
165165 "body" : b"timeout ping\n " ,
166166 "more_body" : True ,
167167 }
168+ await send (stream_event )
168169
169170 try :
170171 chunk = task .result ()
You can’t perform that action at this time.
0 commit comments