Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3673

API fails with std::exception after a timeout occured in earlier any API call

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not A Bug
    • 0.9.1
    • 0.10.0
    • C++ - Library
    • None
    • Windows

    • Important

    Description

      Any API calls( from client to server) fails with std::exception after a timeout occurred in earlier API call.

      Steps:
      1) Call a Server API which doesn't finish within the socket read timeout
      2) This call throws apache::thrift::transport::TTransportException with a TIMEOUT type (Excepted)
      3) Call Another API, this fails because the earlier call response data in the socket read buffer.

      // Here is the part of generated code in client
      void ClientGeneratedClass::recv_[CURRENTAPI_NAME]
      {
      ...
      ..
      ..
      if (fname.compare([CURRENTAPI_NAME]) != 0)

      { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); }

      }
      This iprot_->skip doesn't seems to be cleaning the read buffer correctly.

      Please advise any workaround or solution for this.

      Attachments

        Issue Links

          Activity

            People

              nsuke Nobuaki Sukegawa
              sabudani SABU DANIEL
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: