Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.9, 0.9.1, 0.9.2
-
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()