if it expired waiting on the queue for processing, kill 'er

This commit is contained in:
jrandom
2004-06-25 17:12:01 +00:00
committed by zzz
parent 983d258bce
commit a351a29bf3

View File

@ -61,6 +61,19 @@ public class HandleTunnelMessageJob extends JobImpl {
public String getName() { return "Handle Inbound Tunnel Message"; }
public void runJob() {
TunnelId id = _message.getTunnelId();
if (_context.clock().now() >= _message.getMessageExpiration().getTime()) {
if (_log.shouldLog(Log.ERROR))
_log.error("Accepted message (" + _message.getUniqueId() + ") expired on the queue for tunnel "
+ id.getTunnelId() + " expiring "
+ (_context.clock().now() - _message.getMessageExpiration().getTime())
+ "ms agp");
_context.messageHistory().messageProcessingError(_message.getUniqueId(),
TunnelMessage.class.getName(),
"tunnel message expired on the queue");
return;
}
TunnelInfo info = _context.tunnelManager().getTunnelInfo(id);
if (info == null) {