[ 
https://issues.apache.org/jira/browse/THRIFT-3002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom Hunt updated THRIFT-3002:
-----------------------------
    Patch Info: Patch Available

> Python loops forever with TZlibTransport and TFileObjectTransport
> -----------------------------------------------------------------
>
>                 Key: THRIFT-3002
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3002
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Library
>    Affects Versions: 0.9.2
>         Environment: Ubuntu Linux
>            Reporter: Tom Hunt
>              Labels: easyfix
>
> When using a TZlibTransport wrapping a TFileObjectTransport, at end of file 
> the TZlibTransport loops forever instead of doing anything sensible. This is 
> because the TZlibTransport does not check for 0-length reads itself and calls 
> TFileObjectTransport.read() rather than TFileObjectTransport.readAll() (the 
> latter does its own checking and raises EOFError()). Thus, TZlibTransport 
> spins forever on 0-length reads and hangs the program. Suggested fix: make 
> TZlibTransport call readAll() instead of read() in its readComp() method, or 
> check for 0-length reads on its own and raise EOFError().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to