File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -918,7 +918,7 @@ def get_integration(
918
918
def _close_transport (self ) -> Optional [asyncio .Task [None ]]:
919
919
"""Close transport and return cleanup task if any."""
920
920
if self .transport is not None :
921
- cleanup_task = self .transport .kill ()
921
+ cleanup_task = self .transport .kill () # type: ignore
922
922
self .transport = None
923
923
return cleanup_task
924
924
return None
@@ -963,7 +963,9 @@ async def _flush_and_close(
963
963
_flush_and_close (timeout , callback )
964
964
)
965
965
except RuntimeError :
966
+ # Shutdown the components anyway
966
967
self ._close_components ()
968
+ self ._close_transport ()
967
969
logger .warning ("Event loop not running, aborting close." )
968
970
return None
969
971
# Enforce flush before shutdown
Original file line number Diff line number Diff line change @@ -781,7 +781,7 @@ def _make_pool(
781
781
782
782
return httpcore .AsyncConnectionPool (** opts )
783
783
784
- def kill (self : Self ) -> Optional [asyncio .Task [None ]]: # type: ignore
784
+ def kill (self : Self ) -> Optional [asyncio .Task [None ]]: # type: ignore[override]
785
785
786
786
logger .debug ("Killing HTTP transport" )
787
787
self ._worker .kill ()
You can’t perform that action at this time.
0 commit comments