protected void stopARKFetcher() {
if(!node.enableARKs) return;
Logger.minor(this, "Stopping ARK fetcher for " + this + " : " + myARK);
// FIXME any way to reduce locking here?
USKRetriever ret;
synchronized(arkFetcherSync) {
if(arkFetcher == null) {
if(logMINOR) Logger.minor(this, "ARK fetcher not running for "+this);
return;
}
ret = arkFetcher;
arkFetcher = null;
}
final USKRetriever unsub = ret;
node.executor.execute(new Runnable() {
@Override
public void run() {
node.clientCore.uskManager.unsubscribeContent(myARK, unsub, true);