Fix the bug I introduced with the last few changes (deadlock in ConnectionPool).

This commit is contained in:
JoelKatz
2012-11-01 03:09:09 -07:00
parent fba18bf6f7
commit d9ff4f2ad4
4 changed files with 9 additions and 7 deletions

View File

@@ -313,7 +313,7 @@ Peer::pointer ConnectionPool::peerConnect(const std::string& strIp, int iPort)
if ((it = mIpMap.find(pipPeer)) == mIpMap.end())
{
Peer::pointer ppNew(Peer::create(theApp->getIOService(), mCtx));
Peer::pointer ppNew(Peer::create(theApp->getIOService(), mCtx, ++mLastPeer));
// Did not find it. Not already connecting or connected.
ppNew->connect(strIp, iPort);