tests: don’t overwrite $timeout, kill timer when done
This commit is contained in:
parent
4e1d50fa3a
commit
359717970d
|
@ -104,9 +104,10 @@ sub wait_for_event {
|
|||
};
|
||||
|
||||
# Trigger timeout after $timeout seconds (can be fractional)
|
||||
my $timeout = AE::timer $timeout, 0, sub { warn "timeout"; $cv->send(0) };
|
||||
my $t = AE::timer $timeout, 0, sub { warn "timeout ($timeout secs)"; $cv->send(0) };
|
||||
|
||||
my $result = $cv->recv;
|
||||
undef $t;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue