Author: toad
Date: 2008-03-21 18:53:38 +0000 (Fri, 21 Mar 2008)
New Revision: 18685

Modified:
   trunk/freenet/src/freenet/node/OpennetManager.java
Log:
No point rejecting the ref (or logging) if we've lost the connection.

Modified: trunk/freenet/src/freenet/node/OpennetManager.java
===================================================================
--- trunk/freenet/src/freenet/node/OpennetManager.java  2008-03-21 18:41:50 UTC 
(rev 18684)
+++ trunk/freenet/src/freenet/node/OpennetManager.java  2008-03-21 18:53:38 UTC 
(rev 18685)
@@ -615,12 +615,14 @@
        if(logMINOR)
                Logger.minor(this, "Receiving noderef (reply="+isReply+") as 
bulk transfer for request uid "+uid+" with transfer "+xferUID+" from "+source);
        if(!br.receive()) {
-               String msg = "Failed to receive noderef bulk transfer for 
"+this+" : "+RetrievalException.getErrString(prb.getAbortReason())+" : 
"+prb.getAbortDescription()+" from "+source;
-               if(prb.getAbortReason() != 
RetrievalException.SENDER_DISCONNECTED)
-                       Logger.error(this, msg);
-               else
-                       Logger.normal(this, msg);
-               if(sendReject) rejectRef(uid, source, 
DMT.NODEREF_REJECTED_TRANSFER_FAILED, ctr);
+               if(source.isConnected()) {
+                       String msg = "Failed to receive noderef bulk transfer 
for "+this+" : "+RetrievalException.getErrString(prb.getAbortReason())+" : 
"+prb.getAbortDescription()+" from "+source;
+                       if(prb.getAbortReason() != 
RetrievalException.SENDER_DISCONNECTED)
+                               Logger.error(this, msg);
+                       else
+                               Logger.normal(this, msg);
+                       if(sendReject) rejectRef(uid, source, 
DMT.NODEREF_REJECTED_TRANSFER_FAILED, ctr);
+               }
                        return null;
        }
        byte[] noderef = new byte[realLength];


Reply via email to