Summary: TSocket shouldn't let you set the timeout before it's got a valid handle

Reviewed By: dcorson

Test Plan: tested in sandbox


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665172 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Wang 2007-07-24 23:59:51 +00:00
parent d4de1e93c6
commit e168d5e127

View File

@ -27,6 +27,8 @@ class TSocket(TTransportBase):
def setTimeout(self, ms):
if (self.handle != None):
self.handle.settimeout(ms/1000.00)
else:
raise TTransportException(TTransportException.NOT_OPEN, 'No handle yet in TSocket')
def open(self):
try: