HADOOP-18238. Fix reentrancy check in SFTPFileSystem.close() (#4330)
Contributed by Ashutosh Gupta
This commit is contained in:
parent
ba6520f67f
commit
21fa693d38
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue