Ignore:
Timestamp:
Jun 27, 2018, 11:45:33 AM (3 years ago)
Author:
Bayard Gildas
Message:

bug #36 solved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/TargetEthController.cpp

    r238 r249  
    235235  Thread::Info("Debug: Listening to port %d\n", listeningPort);
    236236  // accept incoming connection
    237   bool connectionAccepted = false;
    238   while (!connectionAccepted) {
     237  while (!controlSocket) {
    239238    try {
    240239      controlSocket = listeningSocket->Accept(100000000);
    241240    } catch (std::logic_error &e) {
    242       Thread::Err(e.what());
    243       return false;
     241      Thread::Err("%s\n",e.what());
     242      if (ToBeStopped())
     243        return false;
    244244    } catch (std::runtime_error e) {
    245245      // timeout
    246       if (ToBeStopped())
    247         return false;
    248     }
    249     if (controlSocket == nullptr) {
    250       return false;
    251     } else
    252       connectionAccepted = true;
     246      //Thread::Err("%s\n",e.what());
     247      if (ToBeStopped())
     248        return false;
     249    }
    253250  }
    254251  Thread::Info("Debug: Connexion accepted\n");
Note: See TracChangeset for help on using the changeset viewer.