From a1a8edfc0a43755c2e08342fa072903bc86236f4 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Sat, 30 May 2015 17:54:02 +0200 Subject: [PATCH] wrap HeaReader close() in a catch Throwable block to prevent that an excpetion during close blocks the whole shotdown process --- source/net/yacy/kelondro/blob/HeapReader.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/net/yacy/kelondro/blob/HeapReader.java b/source/net/yacy/kelondro/blob/HeapReader.java index 701290a49..59dc30f2f 100644 --- a/source/net/yacy/kelondro/blob/HeapReader.java +++ b/source/net/yacy/kelondro/blob/HeapReader.java @@ -603,6 +603,7 @@ public class HeapReader { public void close(boolean writeIDX) { if (this.index == null) return; synchronized (this.index) { + try { if (this.file != null) try { this.file.close(); @@ -654,6 +655,7 @@ public class HeapReader { if (this.index != null) this.index.close(); this.index = null; this.closeDate = new Date(); + } catch (Throwable e) {ConcurrentLog.logException(e);} log.info("close HeapFile " + this.heapFile.getName() + "; trace: " + ConcurrentLog.stackTrace()); } }