Author: zothar
Date: 2006-07-14 23:35:32 +0000 (Fri, 14 Jul 2006)
New Revision: 9617
Modified:
trunk/freenet/src/freenet/node/ARKFetcher.java
Log:
Lock consistency changes to ARKFetcher
Modified: trunk/freenet/src/freenet/node/ARKFetcher.java
===================================================================
--- trunk/freenet/src/freenet/node/ARKFetcher.java 2006-07-14 23:23:01 UTC
(rev 9616)
+++ trunk/freenet/src/freenet/node/ARKFetcher.java 2006-07-14 23:35:32 UTC
(rev 9617)
@@ -100,10 +100,20 @@
if(cg != null)
try {
- if(!isFetching) {
- node.addARKFetcher(identity,this);
- isFetching = true;
+ boolean localIsFetching = false;
+ synchronized(this) {
+ localIsFetching = isFetching;
}
+ if(!localIsFetching) {
+ String localIdentity = null;
+ synchronized(this) {
+ localIdentity = identity;
+ }
+ node.addARKFetcher(localIdentity,this);
+ synchronized(this) {
+ isFetching = true;
+ }
+ }
cg.start();
} catch (FetchException e) {