Ignore:
Timestamp:
May 24, 2018, 9:46:08 AM (3 years ago)
Author:
Sanahuja Guillaume
Message:

resolve some bugs when closing connection with gcs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/FrameworkManager_impl.cpp

    r234 r243  
    189189  if (com != NULL) {
    190190    delete com;
     191    //avoid waiting on closing if connection is lost
     192    if(connection_lost) {
     193      bool blocking = false;
     194      if (UDT::setsockopt(com_sock, 0, UDT_SNDSYN, &blocking, sizeof(bool)) != 0)
     195        Err("UDT::setsockopt error (UDT_SNDSYN)\n");
     196    }
    191197    status = UDT::close(com_sock);
    192198    if (status != 0)
     
    194200
    195201    SleepMS(200); // a revoir, sinon UDT::cleanup bloque en RT
    196     UDT::cleanup();
     202   
     203    if(connection_lost) {
     204      //don't know why?
     205     Warn("Cleaning up UDT socket, this can take some time\n");
     206    }
     207    if (UDT::cleanup() != 0)
     208        Err("UDT::cleanup error\n");
    197209  }
    198210
Note: See TracChangeset for help on using the changeset viewer.