Use TimeValue#sleep()

This commit is contained in:
Michael Osipov 2019-12-15 10:57:30 +01:00
parent 3d502c9ac4
commit 830263d279
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ public final class IdleConnectionEvictor {
public void run() {
try {
while (!Thread.currentThread().isInterrupted()) {
Thread.sleep(localSleepTime.toMillis());
localSleepTime.sleep();
connectionManager.closeExpired();
if (maxIdleTime != null) {
connectionManager.closeIdle(maxIdleTime);

View File

@ -863,7 +863,7 @@ public class H2AsyncClientBuilder {
public void run() {
try {
while (!Thread.currentThread().isInterrupted()) {
Thread.sleep(maxIdleTime.toMillis());
maxIdleTime.sleep();
connPool.closeIdle(maxIdleTime);
}
} catch (final InterruptedException ex) {