mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
asyncio: Add Transport.is_closing()
See https://github.com/python/asyncio/pull/291 for details.
This commit is contained in:
parent
da32d26ab9
commit
5bb1afb332
11 changed files with 36 additions and 14 deletions
|
@ -302,7 +302,7 @@ class StreamWriter:
|
|||
if exc is not None:
|
||||
raise exc
|
||||
if self._transport is not None:
|
||||
if self._transport._closing:
|
||||
if self._transport.is_closing():
|
||||
# Yield to the event loop so connection_lost() may be
|
||||
# called. Without this, _drain_helper() would return
|
||||
# immediately, and code that calls
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue