@@ -45,6 +45,7 @@ of this software and associated documentation files (the "Software"), to deal
4545import java .util .TimerTask ;
4646import java .util .concurrent .ConcurrentHashMap ;
4747import java .util .concurrent .TimeUnit ;
48+ import java .util .concurrent .atomic .AtomicInteger ;
4849import lombok .extern .slf4j .Slf4j ;
4950import net .lingala .zip4j .ZipFile ;
5051import net .lingala .zip4j .model .ZipParameters ;
@@ -678,6 +679,8 @@ private class AbortedMonitorTask extends TimerTask {
678679
679680 private final ChronosJob observable ;
680681
682+ private final AtomicInteger getStatusErrorCounter = new AtomicInteger ( 0 );
683+
681684
682685 /**
683686 *
@@ -710,9 +713,13 @@ public void run() {
710713 // Quietly cancelObservation and de-register this observable since it is already finished
711714 cancelAndRemoveObservable ();
712715 }
716+ getStatusErrorCounter .set ( 0 );
713717 } catch ( NoSuchElementException | ChronosException | IOException ex ) {
714- log .warn ( "getStatus for \" " + this .observable + "\" failed. Canceling monitoring!" , ex );
715- cancelAndRemoveObservable ();
718+ getStatusErrorCounter .incrementAndGet ();
719+ if ( getStatusErrorCounter .get () % 10 == 0 ) {
720+ log .warn ( "Unable to get status of \" " + this .observable + "\" since quite a while." , ex );
721+ }
722+ //cancelAndRemoveObservable();
716723 } catch ( InterruptedException ex ) {
717724 log .warn ( "We have been interrupted!" , ex );
718725 cancelAndRemoveObservable ();
0 commit comments