Use TimeValue#sleep()
This commit is contained in:
parent
3d502c9ac4
commit
830263d279
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue