Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

didn't support TFramedTransport #54

Open
Sherler opened this issue May 16, 2019 · 2 comments
Open

didn't support TFramedTransport #54

Sherler opened this issue May 16, 2019 · 2 comments

Comments

@Sherler
Copy link

Sherler commented May 16, 2019

the connection_pool will throw exception below if the server side use TFramedTransport

  File "thriftpy2/protocol/cybin/cybin.pyx", line 60, in cybin.read_i32
  File "thriftpy2/transport/buffered/cybuffered.pyx", line 65, in thriftpy2.transport.buffered.cybuffered.TCyBufferedTransport.c_read
  File "thriftpy2/transport/buffered/cybuffered.pyx", line 69, in thriftpy2.transport.buffered.cybuffered.TCyBufferedTransport.read_trans
  File "thriftpy2/transport/cybase.pyx", line 61, in thriftpy2.transport.cybase.TCyBuffer.read_trans
  File "/root/miniconda2/envs/segmentor/lib/python2.7/site-packages/thriftpy2/transport/socket.py", line 132, in read
    message='TSocket read 0 bytes')

and I couldn't find any thing about TFramedTransport in the code.

@ethe
Copy link
Member

ethe commented May 16, 2019

thrift_connector does not support TFramedTransport yet, you can simply implement a custom Client class for now like https://github.com/Thriftpy/thrift_connector/blob/master/thrift_connector/connection_pool.py#L150. thrift_connector will implement it in the future.

@Sherler
Copy link
Author

Sherler commented May 20, 2019

thank you for your reply! I've already implemented it.

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

No branches or pull requests

2 participants