From 5bb1afb3322ecf370cf328d40fb95eb0a3ddab7c Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Mon, 16 Nov 2015 12:43:21 -0500 Subject: asyncio: Add Transport.is_closing() See https://github.com/python/asyncio/pull/291 for details. --- Lib/asyncio/streams.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/asyncio/streams.py') diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 64d10203d2..6b5e96aea2 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -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 -- cgit v1.2.1