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

@@ -39,7 +39,8 @@ PeerDoor::PeerDoor(boost::asio::io_service& io_service) :
void PeerDoor::startListening()
{
Peer::pointer new_connection = Peer::create(mAcceptor.get_io_service(), mCtx);
Peer::pointer new_connection = Peer::create(mAcceptor.get_io_service(), mCtx,
theApp->getConnectionPool().assignPeerId());
mAcceptor.async_accept(new_connection->getSocket(),
boost::bind(&PeerDoor::handleConnect, this, new_connection,