Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 7, 2011, 4:31:37 PM (14 years ago)
Author:
smerkli
Message:

yay, works

Location:
code/branches/masterserver2/src/libraries/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/masterserver2/src/libraries/network/MasterServer.cc

    r8202 r8203  
    108108    /* get an iterator */
    109109    std::list<ServerListElem>::iterator i;
     110     
     111    if( mainlist.serverlist.size() == 0 )
     112      return;
    110113
    111114    /* loop through list elements */
     
    113116        != mainlist.serverlist.end(); ++i )
    114117    {
    115       if( mainlist.serverlist.size() != 0 && (*i).peer &&
     118      if( (*i).peer &&
    116119         ((*i).peer->state == ENET_PEER_STATE_DISCONNECTED ||
    117120          (*i).peer->state == ENET_PEER_STATE_ZOMBIE ))
    118121      { mainlist.delServerByName( (*i).ServerInfo.getServerName() );
    119122        COUT(2) << "someone timed out.\n";
     123        break;
    120124      }
    121125    }
  • code/branches/masterserver2/src/libraries/network/ServerList.cc

    r8202 r8203  
    6161      if( (*i).ServerInfo.getServerName() == name )
    6262      { /* found this name, remove and quit */
    63         this->serverlist.erase( i );
     63        this->serverlist.clear();
    6464        return true;
    6565      }
Note: See TracChangeset for help on using the changeset viewer.