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

Contributed by Ashutosh Gupta
This commit is contained in:
Ashutosh Gupta 2022-05-30 17:34:06 +01:00 committed by GitHub
parent ba6520f67f
commit 21fa693d38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -709,11 +709,11 @@ public FileStatus getFileStatus(Path f) throws IOException {
@Override @Override
public void close() throws IOException { public void close() throws IOException {
if (closed.getAndSet(true)) {
return;
}
try { try {
super.close(); super.close();
if (closed.getAndSet(true)) {
return;
}
} finally { } finally {
if (connectionPool != null) { if (connectionPool != null) {
connectionPool.shutdown(); connectionPool.shutdown();