From 49aa9fc5707909e2af697a0c60a0cf39db41a776 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 4 May 2020 15:51:29 +0100 Subject: Remove reactor shutdown kludge - it's no longer necessary. --- lib/Hal/Cdroms.pm | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/Hal/Cdroms.pm b/lib/Hal/Cdroms.pm index 19d8263..a4e0b65 100644 --- a/lib/Hal/Cdroms.pm +++ b/lib/Hal/Cdroms.pm @@ -261,13 +261,13 @@ sub _reactor_wait { if (my $val = $check_found->($msg)) { $found_val = $val; - _reactor_shutdown($reactor); + $reactor->shutdown; } 1; }); if ($timeout) { $reactor->add_timeout($timeout, Net::DBus::Callback->new(method => sub { - _reactor_shutdown($reactor); + $reactor->shutdown; })); } $reactor->run; @@ -275,15 +275,6 @@ sub _reactor_wait { $found_val; } -sub _reactor_shutdown { - my ($reactor) = @_; - - $reactor->shutdown; - - # ugly, but needed for shutdown to work... - $reactor->add_timeout(1, Net::DBus::Callback->new(method => sub {})); -} - sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 } =head1 AUTHOR -- cgit v1.2.1