Skip to content

Commit 0414755

Browse files
asjadsyedJens-G
authored andcommitted
THRIFT-5861: Add isOpen method to TTornadoStreamTransport
1 parent c5c0e6e commit 0414755

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/py/src/TTornado.py

+5
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ def __init__(self, host, port, stream=None, io_loop=None):
8989
def with_timeout(self, timeout, future):
9090
return gen.with_timeout(timeout, future)
9191

92+
def isOpen(self):
93+
if self.stream is None:
94+
return False
95+
return not self.stream.closed()
96+
9297
@gen.coroutine
9398
def open(self, timeout=None):
9499
logger.debug('socket connecting')

0 commit comments

Comments
 (0)