mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-08 00:00:54 +03:00
Close remote handles when closing stream.
This commit is contained in:
@@ -166,6 +166,8 @@ public class RemoteFile
|
||||
public void close()
|
||||
throws IOException {
|
||||
flush();
|
||||
// Close handle
|
||||
RemoteFile.this.close();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -269,6 +271,8 @@ public class RemoteFile
|
||||
throw new SFTPException("Unexpected packet: " + res.getType());
|
||||
}
|
||||
}
|
||||
// Close handle
|
||||
RemoteFile.this.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user