RequestContext.java - sonar fixes
[appc.git] / appc-adapters / appc-iaas-adapter / appc-iaas-adapter-bundle / src / main / java / org / onap / appc / adapter / iaas / impl / RequestContext.java
index 8c2833d..5cea9c0 100644 (file)
@@ -125,6 +125,7 @@ public class RequestContext {
                      * amount of delay time needed and reenter the sleep until we get to the future time.
                      */
                     time = future - System.currentTimeMillis();
+                    Thread.currentThread().interrupt();
                 }
             }
         }
@@ -193,7 +194,7 @@ public class RequestContext {
         }
         accumulatedTime += (now - startTime);
         startTime = now;
-        return !(accumulatedTime > timeToLive);
+        return accumulatedTime <= timeToLive;
     }
 
     /**