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

reusing TNonblockingServer::TConnection cause dirty TSocket

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9, 0.9.1, 0.9.2
    • Fix Version/s: 0.9.3
    • Component/s: C++ - Library
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: