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


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.

Reply via email to