Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 29, 2006, 10:09:02 AM (18 years ago)
Author:
patrick
Message:

forced reconnections are now registrated and handled

File:
1 edited

Legend:

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

    r9600 r9601  
    717717  PeerInfo* pInfo = &this->peers[userId];
    718718
     719  IP proxyIP;
     720  if( this->networkMonitor->isForcedReconnection())
     721    proxyIP = this->networkMonitor->getForcedReconnectionIP();
     722  else
     723    proxyIP = pInfo->handshake->getProxy1Address();
     724
    719725  PRINTF(0)("===============================================\n");
    720726  PRINTF(0)("Client is redirected to the other proxy servers\n");
    721727  PRINTF(0)("  user id: %i\n", userId);
    722   PRINTF(0)("  connecting to: %s\n", this->networkMonitor->getFirstChoiceProxy()->ip.ipString().c_str());
     728  PRINTF(0)("  connecting to: %s\n", proxyIP.ipString().c_str());
    723729  PRINTF(0)("===============================================\n");
    724730
     
    726732  pInfo->lastAckedState = 0;
    727733  pInfo->lastRecvedState = 0;
    728 
    729   // temp save the ip address here
    730   IP proxyIP = pInfo->handshake->getProxy1Address();
    731734
    732735  // disconnect from the current server and reconnect to proxy server
     
    748751void NetworkStream::reconnectToServer(IP address)
    749752{
    750 
     753  this->networkMonitor->setForcedReconnection(address);
     754  this->handleReconnect( NET_ID_MASTER_SERVER);
    751755}
    752756
     
    759763void NetworkStream::softReconnectToServer(IP address)
    760764{
    761 
     765  this->networkMonitor->setForcedReconnection(address);
     766  this->handleReconnect( NET_ID_MASTER_SERVER);
    762767}
    763768
Note: See TracChangeset for help on using the changeset viewer.