Author: zothar
Date: 2006-09-08 02:49:20 +0000 (Fri, 08 Sep 2006)
New Revision: 10426
Modified:
trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
Log:
Log how long since we've "heard from the receiver" rather than the threshold
after which we complain
Modified: trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
===================================================================
--- trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java 2006-09-07
22:25:24 UTC (rev 10425)
+++ trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java 2006-09-08
02:49:20 UTC (rev 10426)
@@ -239,13 +239,14 @@
if(_sendComplete)
return false;
if (msg == null) {
- if((timeAllSent > 0) &&
((System.currentTimeMillis() - timeAllSent) > SEND_TIMEOUT) &&
+ long now = System.currentTimeMillis();
+ if((timeAllSent > 0) && ((now - timeAllSent) >
SEND_TIMEOUT) &&
(getNumSent() ==
_prb.getNumPackets())) {
synchronized(_senderThread) {
_sendComplete = true;
_senderThread.notifyAll();
}
- Logger.error(this, "Terminating send
"+_uid+" to "+_destination+" from "+_usm.getPortNumber()+" as we haven't heard
from receiver in "+SEND_TIMEOUT+"ms.");
+ Logger.error(this, "Terminating send
"+_uid+" to "+_destination+" from "+_usm.getPortNumber()+" as we haven't heard
from receiver in "+(now - timeAllSent)+"ms.");
return false;
} else {
if(logMINOR) Logger.minor(this,
"Ignoring timeout: timeAllSent="+timeAllSent+" ("+(System.currentTimeMillis() -
timeAllSent)+"), getNumSent="+getNumSent()+"/"+_prb.getNumPackets());