/**
* Clean up all the leaked handles and file descriptors.
*/
private void closeCloseables(Context cx)
{
AbstractFilesystem fs = (AbstractFilesystem)requireInternal("fs", cx);
if (fs == null) {
// We might still be initializing
return;
}
fs.cleanup();
for (Closeable c: openHandles.values()) {
if (log.isDebugEnabled()) {
log.debug("Closing leaked handle {}", c);
}