HADOOP-16126. ipc.Client.stop() may sleep too long to wait for all connections.
(cherry picked from commit 0edb0c51dc2c4ae2f353e260f01912e28033d70f)
This commit is contained in:
parent
a49cb4465e
commit
5bed24ad5f
@ -86,6 +86,7 @@
|
||||
public class Client implements AutoCloseable {
|
||||
|
||||
public static final Logger LOG = LoggerFactory.getLogger(Client.class);
|
||||
private static final int STOP_SLEEP_TIME_MS = 10;
|
||||
|
||||
/** A counter for generating call IDs. */
|
||||
private static final AtomicInteger callIdCounter = new AtomicInteger();
|
||||
@ -1336,7 +1337,7 @@ public void stop() {
|
||||
// wait until all connections are closed
|
||||
while (!connections.isEmpty()) {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
Thread.sleep(STOP_SLEEP_TIME_MS);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user