You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Eric Lam (JIRA)" <ji...@apache.org> on 2010/03/14 09:11:27 UTC
[jira] Updated: (THRIFT-732) server exits abnormally when client
calls send_xxx function without calling recv_xxx function
[ https://issues.apache.org/jira/browse/THRIFT-732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Lam updated THRIFT-732:
----------------------------
Attachment: leaf.cpp
aggregator_server.cpp
client and server program attached.
> server exits abnormally when client calls send_xxx function without calling recv_xxx function
> ---------------------------------------------------------------------------------------------
>
> Key: THRIFT-732
> URL: https://issues.apache.org/jira/browse/THRIFT-732
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (C++)
> Affects Versions: 0.2
> Environment: MacOS SnowLeopard
> Reporter: Eric Lam
> Fix For: 0.2
>
> Attachments: aggregator_server.cpp, leaf.cpp
>
>
> TNonblockingServer exits abnormally when client calls send_xxx function without recv_xxx function.
> The following code can reproduce the issue,
> #include <stdlib.h>
> #include <stdio.h>
> #include <iostream>
> #include "aggregator.h"
> #include <protocol/TBinaryProtocol.h>
> #include <transport/TSocket.h>
> #include <transport/TBufferTransports.h>
> using namespace apache::thrift;
> using namespace apache::thrift::protocol;
> using namespace apache::thrift::transport;
> //using namespace apache::thrift::concurrency;
> using boost::shared_ptr;
> int main(int argc, const char *argv[]) {
> shared_ptr<TSocket> socket(new TSocket("localhost", 9090));
> shared_ptr<TFramedTransport> framedtransport(new TFramedTransport(socket));
> shared_ptr<TProtocol> protocol(new TBinaryProtocol(framedtransport));
> aggregatorClient client(protocol);
>
> try {
> framedtransport->open();
> } catch (TTransportException e) {
> std::cout << "transport exception" << std::endl;
> return 1;
> } catch (TException e2) {
> std::cout << "exception" << std::endl;
> }
>
> UserProfile profile;
> client.send_retrieve(1);
>
> framedtransport->close();
> return 0;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.