[freenet-cvs] r18939 - trunk/freenet/src/freenet/io/xfer

nextgens at freenetproject.org nextgens at freenetproject.org
Thu Apr 3 08:01:13 UTC 2008


Author: nextgens
Date: 2008-04-03 08:01:12 +0000 (Thu, 03 Apr 2008)
New Revision: 18939

Modified:
   trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
Log:
We should get the lock before the wait()

Modified: trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
===================================================================
--- trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java	2008-04-03 07:33:00 UTC (rev 18938)
+++ trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java	2008-04-03 08:01:12 UTC (rev 18939)
@@ -300,7 +300,9 @@
 				try {
 	            	long now = System.currentTimeMillis();
 	            	if(now > deadline) throw new IllegalStateException("Waited more than 1 hour for transfer completion!");
+			synchronized(BlockTransmitter.this) {
 	                wait(deadline - now);
+			}
 				} catch (InterruptedException e) {
 					// Ignore
 				}




More information about the cvs mailing list