HADOOP-18238. Fix reentrancy check in SFTPFileSystem.close() (#4330)
Contributed by Ashutosh Gupta Change-Id: I2742675add74259a93b3762a80c7ab5ee6d08c37
This commit is contained in:
parent
dd9b8af9c4
commit
de4c975710
|
@ -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