File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -829,6 +829,9 @@ async def _on_headers_request_sent(
829
829
await trace .send_request_headers (method , url , headers )
830
830
831
831
832
+ _CONNECTION_CLOSED_EXCEPTION = ClientConnectionError ("Connection closed" )
833
+
834
+
832
835
class ClientResponse (HeadersMixin ):
833
836
834
837
# Some of these attributes are None when created,
@@ -1188,7 +1191,7 @@ def _cleanup_writer(self) -> None:
1188
1191
def _notify_content (self ) -> None :
1189
1192
content = self .content
1190
1193
if content and content .exception () is None :
1191
- set_exception (content , ClientConnectionError ( "Connection closed" ) )
1194
+ set_exception (content , _CONNECTION_CLOSED_EXCEPTION )
1192
1195
self ._released = True
1193
1196
1194
1197
async def wait_for_close (self ) -> None :
You can’t perform that action at this time.
0 commit comments