8000 Transport is_open() doesn't return False after closure · Issue #230 · Thriftpy/thriftpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.
This repository was archived by the owner on Dec 10, 2018. It is now read-only.
Transport is_open() doesn't return False after closure #230
Closed
@gorlins

Description

@gorlins

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

python-happybase/happybase#133

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0