提交 8c61fb9d authored 作者: Thomas Mueller's avatar Thomas Mueller

The file lock thread is now stopped when the database is closed.

上级 ebf0e840
...@@ -159,11 +159,19 @@ public class FileLock { ...@@ -159,11 +159,19 @@ public class FileLock {
} }
} catch (Exception e) { } catch (Exception e) {
trace.debug("unlock", e); trace.debug("unlock", e);
} } finally {
fileName = null; fileName = null;
socket = null; socket = null;
locked = false; locked = false;
} }
try {
if (watchdog != null) {
watchdog.interrupt();
}
} catch (Exception e) {
trace.debug("unlock", e);
}
}
/** /**
* Add or change a setting to the properties. This call does not save the * Add or change a setting to the properties. This call does not save the
...@@ -347,6 +355,10 @@ public class FileLock { ...@@ -347,6 +355,10 @@ public class FileLock {
Thread.sleep(sleep); Thread.sleep(sleep);
} catch (OutOfMemoryError e) { } catch (OutOfMemoryError e) {
// ignore // ignore
} catch (InterruptedException e) {
// ignore
} catch (NullPointerException e) {
// ignore
} catch (Exception e) { } catch (Exception e) {
trace.debug("watchdog", e); trace.debug("watchdog", e);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论