Author: toad
Date: 2008-12-13 22:52:43 +0000 (Sat, 13 Dec 2008)
New Revision: 24298

Modified:
   trunk/freenet/src/freenet/io/xfer/BulkTransmitter.java
Log:
If the wait() is interrupted, we might have received a packet.


Modified: trunk/freenet/src/freenet/io/xfer/BulkTransmitter.java
===================================================================
--- trunk/freenet/src/freenet/io/xfer/BulkTransmitter.java      2008-12-13 
20:18:41 UTC (rev 24297)
+++ trunk/freenet/src/freenet/io/xfer/BulkTransmitter.java      2008-12-13 
22:52:43 UTC (rev 24298)
@@ -191,7 +191,7 @@
        public boolean send() {
                boolean logMINOR = Logger.shouldLog(Logger.MINOR, this);
                long lastSentPacket = System.currentTimeMillis();
-               while(true) {
+outer: while(true) {
                        if(prb.isAborted()) {
                                if(logMINOR)
                                        Logger.minor(this, "Aborted "+this);
@@ -230,6 +230,7 @@
                                                if(inFlightPackets == 0) break;
                                                try {
                                                        wait();
+                                                       continue outer; // 
Might be a packet...
                                                } catch (InterruptedException 
e) {
                                                        // Ignore
                                                }

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to