2004-12-01 jrandom
* Fix for a race in the streaming lib as caused by some odd SAM activity
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user