wrap HeaReader close() in a catch Throwable block to prevent that an

excpetion during close blocks the whole shotdown process
pull/8/head
Michael Peter Christen 10 years ago
parent b43811d38c
commit a1a8edfc0a

@ -603,6 +603,7 @@ public class HeapReader {
public void close(boolean writeIDX) { public void close(boolean writeIDX) {
if (this.index == null) return; if (this.index == null) return;
synchronized (this.index) { synchronized (this.index) {
try {
if (this.file != null) if (this.file != null)
try { try {
this.file.close(); this.file.close();
@ -654,6 +655,7 @@ public class HeapReader {
if (this.index != null) this.index.close(); if (this.index != null) this.index.close();
this.index = null; this.index = null;
this.closeDate = new Date(); this.closeDate = new Date();
} catch (Throwable e) {ConcurrentLog.logException(e);}
log.info("close HeapFile " + this.heapFile.getName() + "; trace: " + ConcurrentLog.stackTrace()); log.info("close HeapFile " + this.heapFile.getName() + "; trace: " + ConcurrentLog.stackTrace());
} }
} }

Loading…
Cancel
Save