From: Michael Stapelberg Date: Tue, 4 Oct 2011 22:36:43 +0000 (+0100) Subject: tests: don’t overwrite $timeout, kill timer when done X-Git-Tag: 4.1~122^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=359717970da030c1cf9efcb00d17e2c6814f95f5;p=i3%2Fi3 tests: don’t overwrite $timeout, kill timer when done --- diff --git a/testcases/t/lib/i3test.pm b/testcases/t/lib/i3test.pm index 14ec8d32..9230c5ef 100644 --- a/testcases/t/lib/i3test.pm +++ b/testcases/t/lib/i3test.pm @@ -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; }