summaryrefslogtreecommitdiff
path: root/asyncio/transports.py
diff options
context:
space:
mode:
Diffstat (limited to 'asyncio/transports.py')
-rw-r--r--asyncio/transports.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/asyncio/transports.py b/asyncio/transports.py
index 70b323f..5540f7e 100644
--- a/asyncio/transports.py
+++ b/asyncio/transports.py
@@ -14,6 +14,7 @@ class BaseTransport:
if extra is None:
extra = {}
self._extra = extra
+ self._closing = False
def get_extra_info(self, name, default=None):
"""Get optional transport information."""
@@ -29,6 +30,11 @@ class BaseTransport:
"""
raise NotImplementedError
+ @property
+ def closing(self):
+ """Is the transport being closed?"""
+ return self._closing
+
class ReadTransport(BaseTransport):
"""Interface for read-only transports."""