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/dev/XIOS_DEV_CMIP6/src/node/field.cpp

    r1321 r1322  
    569569    { 
    570570      CTimer timer("CField::checkForLateDataFromServer"); 
    571       const CDate nextDataDue = wasDataAlreadyReceivedFromServer ? (lastDataReceivedFromServer + file->output_freq) : context->getCalendar()->getInitDate(); 
    572  
    573       bool isDataLate = nextDataDue < currentDate; 
    574       while (isDataLate && timer.getCumulatedTime() < CXios::recvFieldTimeout) 
     571 
     572      bool isDataLate; 
     573      do 
    575574      { 
    576         timer.resume(); 
    577  
    578         context->checkBuffersAndListen(); 
    579  
    580         timer.suspend(); 
    581  
     575        const CDate nextDataDue = wasDataAlreadyReceivedFromServer ? (lastDataReceivedFromServer + file->output_freq) : context->getCalendar()->getInitDate(); 
    582576        isDataLate = nextDataDue < currentDate; 
    583       } 
     577 
     578        if (isDataLate) 
     579        { 
     580          timer.resume(); 
     581 
     582          context->checkBuffersAndListen(); 
     583 
     584          timer.suspend(); 
     585        } 
     586      } 
     587      while (isDataLate && timer.getCumulatedTime() < CXios::recvFieldTimeout); 
    584588 
    585589      if (isDataLate) 
Note: See TracChangeset for help on using the changeset viewer.