Transport is_open() doesn't return False after closure #230

Closed
gorlins opened this Issue Aug 25, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@gorlins

gorlins commented Aug 25, 2016

Version 0.3.8 python 2.7, transport.close() either does not close the transport or incorrectly returns its status

from thriftpy.thrift import TClient
from thriftpy.transport import TFramedTransport, TSocket
from thriftpy.protocol import TCompactProtocol

_transport_class = TFramedTransport
_protocol_class = TCompactProtocol

socket = TSocket(host, port)
transport = _transport_class(socket)
protocol = _protocol_class(transport, decode_response=False)

print 'Transport open:', transport.is_open() # False
transport.open()
print 'Transport open:', transport.is_open() # True
transport.close()
print 'Transport open:', transport.is_open() # True!!
transport.open()
print 'Transport open:', transport.is_open() # True

wbolster/happybase#133

@lxyu lxyu closed this in 3b0899c Aug 26, 2016

@pyup-bot pyup-bot referenced this issue in scieloorg/scielo-manager Aug 26, 2016

Closed

Pin thriftpy to latest version 0.3.9 #1314

@gorlins

This comment has been minimized.

Show comment
Hide comment

gorlins commented Aug 26, 2016

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment