Author: robert
Date: 2008-01-23 17:43:11 +0000 (Wed, 23 Jan 2008)
New Revision: 17211

Modified:
   trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
Log:
actually send the all sent notification


Modified: trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
===================================================================
--- trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java     2008-01-23 
17:21:42 UTC (rev 17210)
+++ trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java     2008-01-23 
17:43:11 UTC (rev 17211)
@@ -118,6 +118,7 @@
                                                _sentPackets.setBit(packetNo, 
true);
                                                if(_unsent.size() == 0 && 
getNumSent() == totalPackets) {
                                                        //No unsent packets, no 
unreceived packets
+                                                       
sendAllSentNotification();
                                                        timeAllSent = 
System.currentTimeMillis();
                                                        
if(Logger.shouldLog(Logger.MINOR, this))
                                                                
Logger.minor(this, "Sent all blocks, none unsent");
@@ -174,6 +175,14 @@
                _usm.send(_destination, DMT.createSendAborted(_uid, reason, 
desc), _ctr);
        }

+       private void sendAllSentNotification() {
+               try {
+                       _usm.send(_destination, DMT.createAllSent(_uid), _ctr);
+               } catch (NotConnectedException e) {
+                       Logger.normal(this, "disconnected for allSent()");
+               }
+       }
+       
        public boolean send(Executor executor) {
                PartiallyReceivedBlock.PacketReceivedListener myListener=null;



Reply via email to