Working around not being able to do lookup_addr() for IPv6

addresses. Rather than crashing, we warn the user once and then
always time out the call. This addresses #291, and a #355 is new
ticket scheduling fixing the actual problem to later.
This commit is contained in:
Robin Sommer 2011-01-19 11:12:41 -08:00
parent ffaa20602c
commit bbbe32e443
2 changed files with 19 additions and 3 deletions

View file

@ -130,11 +130,17 @@ Trigger::Trigger(Expr* arg_cond, Stmt* arg_body, Stmt* arg_timeout_stmts,
Val* timeout = arg_timeout ? arg_timeout->ExprVal() : 0;
// Make sure we don't get deleted if somebody calls a method like
// Timeout() while evaluating the trigger.
Ref(this);
if ( ! Eval() && timeout )
{
timer = new TriggerTimer(timeout->AsInterval(), this);
timer_mgr->Add(timer);
}
Unref(this);
}
Trigger::~Trigger()