@Override public void run() { freenet.support.Logger.OSThread.logPID(this); try { realRun(); //The last thing that realRun() does is register as a request-sender listener, so any exception here is the end. } catch(NotConnectedException e) { Logger.normal(this, "requestor gone, could not start request handler wait"); tag.handlerThrew(e); } catch(Throwable t) { Logger.error(this, "Caught " + t, t); tag.handlerThrew(t); } }
@Override public void blockTransferFinished(boolean success) { if(success) { // for byte logging status = RequestSender.SUCCESS; // We've fetched it from our datastore, so there won't be a downstream noderef. // But we want to send at least an FNPOpennetCompletedAck, otherwise the request source // may have to timeout waiting for one. That will be the terminal message. try { finishOpennetNoRelay(); } catch (NotConnectedException e) { Logger.normal(this, "requestor gone, could not start request handler wait"); tag.handlerThrew(e); } } else { //also for byte logging, since the block is the 'terminal' message. applyByteCounts(); unregisterRequestHandlerWithNode(); } node.nodeStats.remoteRequest(false, success, true, htl, key.toNormalizedDouble(), realTimeFlag, false); }