[ 
https://issues.apache.org/jira/browse/THRIFT-1647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13863444#comment-13863444
 ] 

Pierre Lamot commented on THRIFT-1647:
--------------------------------------

It seems that the issue is that once we read a message, we don't check if there 
is more data to process, so we can wait for a message which  is already arrived

I enclosed a patch to fix the issue, but it might require a review as this is 
my first patch to the project an I'm not really familiar (yet ^_^) with thrift 
internals. the patch consist to try to decode another message from the bits 
remaining in the buffer and until it fail when there is no more/not enough 
data. it might be overkill for tframedbuffer but I'm not sure there is a way to 
know if there is data remaining in the buffer.

note that there is still a problem when using TJSONProtocol but it is unrelated 
and I will open another ticket and send another patch.

best regards,

Pierre



> NodeJS BufferedTransport does not work beyond the hello-world example
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-1647
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1647
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Library
>    Affects Versions: 0.8
>         Environment: Ubuntu 12.04, NodeJS v0.6;v0.8.0
>            Reporter: Dan Cromer
>            Priority: Minor
>         Attachments: 
> 0001-THRIFT-1647-js-node-data-stream-wasn-t-processed-bey.patch
>
>
> During the setup of NodeJS <-> Apache Thrift integration, we found that the 
> use of BufferedTransport did not work beyond the HelloWorld example.  While 
> NodeJS clients were able to connect, no service invocations actually 
> registered with the server (Java, Thrift 0.8.0)
> Switching to the use of a FramedTransport immediately fixed the issue.  I was 
> unable to debug the issue, but wanted to file an issue so that others were 
> aware.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to