commit | 0414755b6080e53c9de087912bafce264c07da9a | [log] [tgz] |
---|---|---|
author | Asjad Syed <syedasjadsyed@gmail.com> | Tue Apr 08 14:51:30 2025 -0400 |
committer | Jens Geyer <Jens-G@users.noreply.github.com> | Wed Apr 09 22:41:55 2025 +0200 |
tree | 04f65d67156163bee2e09d4c1c220e50a8236cb8 | |
parent | c5c0e6effed33b076b558f42c52ec5fcb26a208e [diff] |
THRIFT-5861: Add isOpen method to TTornadoStreamTransport
diff --git a/lib/py/src/TTornado.py b/lib/py/src/TTornado.py index 0f741c5..c721830 100644 --- a/lib/py/src/TTornado.py +++ b/lib/py/src/TTornado.py
@@ -89,6 +89,11 @@ def with_timeout(self, timeout, future): return gen.with_timeout(timeout, future) + def isOpen(self): + if self.stream is None: + return False + return not self.stream.closed() + @gen.coroutine def open(self, timeout=None): logger.debug('socket connecting')