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

reusing TNonblockingServer::TConnection cause dirty TSocket

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.9, 0.9.1, 0.9.2
    • 0.9.3
    • C++ - Library
    • None
    • Patch Available
    • Patch

    Description

      TNonblockingServer reuse TNonblockingServer::TConnection when possible, and init TSocket object by
      tSocket_->setSocketFD(socket);
      tSocket_->setCachedAddress(addr, addrLen);
      But TSocket::setCachedAddress() don't clear variable peerHost_ and peerAddress_,cause getPeerAddress() and getPeerHost() return dirty data.

      Solution, clear variable peerHost_ and peerAddress_ in TSocket::setCachedAddress()

      Attachments

        1. TSocket_dirty.patch
          0.3 kB
          Jesse Fang

        Activity

          People

            Unassigned Unassigned
            boycht Jesse Fang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: