From bbaad85f6a034c8b5b005808671c1bf59baf1dc3 Mon Sep 17 00:00:00 2001 From: Boris Zentner Date: Fri, 13 Apr 2012 16:16:07 +0200 Subject: [PATCH] The database file handle might be open or not, if we refresh it --- Changes | 4 ++++ source/com/maxmind/geoip/LookupService.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index bd4947b..ea0be53 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +1.2.8 Apr 13th 2012 + - Fix: Close the database file without exceptions whether it is + open(STANDARD) or not(MEMORY_CACHE) in conjunction with the + CHECK_CACHE option. (Lorenzo Crosby) 1.2.7 Apr 10th 2012 - Update timezones ( Boris Zentner ) - Update FIPS codes 20120402 ( Boris Zentner ) diff --git a/source/com/maxmind/geoip/LookupService.java b/source/com/maxmind/geoip/LookupService.java index 73b5aa3..e3e85aa 100644 --- a/source/com/maxmind/geoip/LookupService.java +++ b/source/com/maxmind/geoip/LookupService.java @@ -574,7 +574,7 @@ synchronized void _check_mtime(){ if (t != mtime){ /* GeoIP Database file updated */ /* refresh filehandle */ - file.close(); + close(); file = new RandomAccessFile(databaseFile,"r"); databaseInfo = null; init();