HDDS-1331. In DatanodeStateMachine join check for not null.

This commit is contained in:
Bharat Viswanadham 2019-03-23 09:43:49 -07:00 committed by GitHub
parent 6a34c9bb29
commit 128dd91e10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -363,8 +363,13 @@ public class DatanodeStateMachine implements Closeable {
* @throws InterruptedException
*/
public void join() throws InterruptedException {
stateMachineThread.join();
cmdProcessThread.join();
if (stateMachineThread != null) {
stateMachineThread.join();
}
if (cmdProcessThread != null) {
cmdProcessThread.join();
}
}
/**