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

gorlins opened this Issue Aug 25, 2016 · 1 comment


None yet
1 participant

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
print 'Transport open:', transport.is_open() # True
print 'Transport open:', transport.is_open() # True!!
print 'Transport open:', transport.is_open() # True


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

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


Pin thriftpy to latest version 0.3.9 #1314


This comment has been minimized.

Show comment
Hide comment

gorlins commented Aug 26, 2016


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