소스 검색

HADOOP-18238. Fix reentrancy check in SFTPFileSystem.close() (#4330)

Contributed by Ashutosh Gupta
Ashutosh Gupta 3 년 전
부모
커밋
21fa693d38
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java

+ 3 - 3
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java

@@ -709,11 +709,11 @@ public class SFTPFileSystem extends FileSystem {
 
   @Override
   public void close() throws IOException {
-    if (closed.getAndSet(true)) {
-      return;
-    }
     try {
       super.close();
+      if (closed.getAndSet(true)) {
+        return;
+      }
     } finally {
       if (connectionPool != null) {
         connectionPool.shutdown();