[freenet-cvs] r19690 - trunk/freenet/src/freenet/store

toad at freenetproject.org toad at freenetproject.org
Fri May 2 23:27:36 UTC 2008


Author: toad
Date: 2008-05-02 23:27:36 +0000 (Fri, 02 May 2008)
New Revision: 19690

Modified:
   trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
Abort the transaction even on a ClosedChannelException

Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java	2008-05-02 23:25:02 UTC (rev 19689)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java	2008-05-02 23:27:36 UTC (rev 19690)
@@ -1541,14 +1541,15 @@
 					if(closed) return;
 				}
 			}
-			if(t!=null){
-				try{t.abort();}catch(DatabaseException ex2){}
-			}
 			checkSecondaryDatabaseError(ex);
 			Logger.error(this, "Caught "+ex, ex);
 			ex.printStackTrace();
 			if(ex instanceof IOException) throw (IOException) ex;
 			else throw new IOException(ex.getMessage());
+		} finally {
+			if(t!=null){
+				try{t.abort();}catch(DatabaseException ex2){}
+			}
 		}
 	}
 	




More information about the cvs mailing list