2004-12-01 jrandom

* Fix for a race in the streaming lib as caused by some odd SAM activity
This commit is contained in:
jrandom
2004-12-02 03:20:03 +00:00
committed by zzz
parent 97e8ab7c5b
commit 8abd99d134
3 changed files with 6 additions and 7 deletions

View File

@ -78,14 +78,12 @@ public class PacketLocal extends Packet implements MessageOutputStream.WriteStat
_ackOn = _context.clock().now();
notifyAll();
}
_connection = null;
}
public void cancelled() {
synchronized (this) {
_cancelledOn = _context.clock().now();
notifyAll();
}
_connection = null;
}
/** how long after packet creation was it acked? */
@ -116,11 +114,9 @@ public class PacketLocal extends Packet implements MessageOutputStream.WriteStat
_acceptedOn = _context.clock().now();
else
_acceptedOn = -1;
_connection = null;
}
public void waitForCompletion(int maxWaitMs) {
_connection = null;
long expiration = _context.clock().now()+maxWaitMs;
while (true) {
long timeRemaining = expiration - _context.clock().now();