thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek Goel <goelvivek2...@gmail.com>
Subject Recv timeout not working
Date Wed, 13 Mar 2013 18:49:27 GMT
I am using thrift C++ library at  both end  server and client.

I am facing problem with recv timeout. I am setting a one hour value for
recv timeout. But it is not working, clients are infinitely waiting on
server restart.


My code is:
----------------------------------------------------------------------------------------
boost::shared_ptr<TSocket> socket = boost::shared_ptr<TSocket>(
        new TSocket(server_host_, server_port_));
    socket->setConnTimeout(ThriftConf::connection_timeout_);
    socket->setRecvTimeout(ThriftConf::recv_timeout_);
    socket->setSendTimeout(ThriftConf::send_timeout_);
    boost::shared_ptr<TTransport> tr =
boost::shared_ptr<TBufferedTransport>(
        new TBufferedTransport(socket));
    boost::shared_ptr<TBinaryProtocol> p =
boost::shared_ptr<TBinaryProtocol>(
        new TBinaryProtocol(tr));

----------------------------------------------------------------------------------------------------

Where values are:
(gdb) print ThriftConf::connection_timeout_
$1 = 360000
(gdb) print ThriftConf::recv_timeout_
$2 = 3600000
(gdb) print ThriftConf::send_timeout_
$3 = 180000


regards
Vivek Goel

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message