Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9440 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 24, 2006, 5:28:15 PM (18 years ago)
Author:
patrick
Message:

peers get deleted correctly now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/network_stream.cc

    r9436 r9440  
    324324  {
    325325    // check if the connection is ok else terminate and remove
    326     if ( peers[0].socket && ( !peers[0].socket->isOk() || peers[0].connectionMonitor->hasTimedOut() ) )
     326    if ( !peers.empty() && peers[0].socket && ( !peers[0].socket->isOk() || peers[0].connectionMonitor->hasTimedOut() ) )
    327327    {
    328328      this->handleDisconnect( 0);
     
    333333    {
    334334      this->handleReconnect( 0);
     335    }
     336
     337    PRINTF(0)("node count: %i\n", peers.size());
     338    for ( PeerList::iterator it = peers.begin(); it != peers.end(); it++ )
     339    {
     340      PRINTF(0)("still got peer: %s\n", it->second.ip.ipString().c_str());
    335341    }
    336342  }
     
    637643//   pInfo->socket->reconnectToServer( proxyIP.ipString(), proxyIP.port());
    638644  this->handleDisconnect( userId);
    639   this->connectToProxyServer(proxyIP.ipString(), 9999);
     645//   this->connectToProxyServer(proxyIP.ipString(), 9999);
    640646#warning the ports are not yet integrated correctly in the ip class
    641647
     
    673679  this->freeSocketSlots.push_back( userId );
    674680
    675   peers.erase( userId );
     681  PRINTF(0)("nodes: %i\n", peers.size());
     682  peers.erase( userId);
     683  PRINTF(0)("nodes: %i\n", peers.size());
    676684
    677685//   this->pInfo->userId = 0;
Note: See TracChangeset for help on using the changeset viewer.