Ignore:
Timestamp:
10/30/17 18:16:37 (6 years ago)
Author:
rlacroix
Message:

Fix r1321 so that it makes some sense...

Polling a constant variable multiple times won't make its value change. If the data was received late but before the timeout, XIOS would throw an error anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/field.cpp

    r1321 r1322  
    482482    { 
    483483      CTimer timer("CField::checkForLateDataFromServer"); 
    484       const CDate nextDataDue = wasDataAlreadyReceivedFromServer ? (lastDataReceivedFromServer + file->output_freq) : context->getCalendar()->getInitDate(); 
    485  
    486       bool isDataLate = nextDataDue < currentDate; 
    487       while (isDataLate && timer.getCumulatedTime() < CXios::recvFieldTimeout) 
    488       { 
    489         timer.resume(); 
    490  
    491         context->checkBuffersAndListen(); 
    492  
    493         timer.suspend(); 
    494  
     484 
     485      bool isDataLate; 
     486      do 
     487      { 
     488        const CDate nextDataDue = wasDataAlreadyReceivedFromServer ? (lastDataReceivedFromServer + file->output_freq) : context->getCalendar()->getInitDate(); 
    495489        isDataLate = nextDataDue < currentDate; 
    496       } 
     490 
     491        if (isDataLate) 
     492        { 
     493          timer.resume(); 
     494 
     495          context->checkBuffersAndListen(); 
     496 
     497          timer.suspend(); 
     498        } 
     499      } 
     500      while (isDataLate && timer.getCumulatedTime() < CXios::recvFieldTimeout); 
    497501 
    498502      if (isDataLate) 
Note: See TracChangeset for help on using the changeset viewer.