Skip to content

Commit 17daad3

Browse files
authored
HADOOP-18279. Cancel fileMonitoringTimer even if trustManager isn't defined (#4767)
1 parent 231e095 commit 17daad3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/FileBasedKeyStoresFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,10 @@ String getPassword(Configuration conf, String alias, String defaultPass) {
319319
*/
320320
@Override
321321
public synchronized void destroy() {
322-
if (trustManager != null) {
322+
if (fileMonitoringTimer != null) {
323323
fileMonitoringTimer.cancel();
324+
}
325+
if (trustManager != null) {
324326
trustManager = null;
325327
keyManagers = null;
326328
trustManagers = null;

0 commit comments

Comments
 (0)