+ $mpd->loop->add(
+ IO::Async::Timer::Periodic->new(
+ interval => 300,
+ on_tick => sub {
+ if ($idler) {
+ $log->trace('breaking idle to see if MPD is there');
+ undef $idler;
+ $log->trace("> noidle (direct)");
+ $mpd->{mpd_handle}->write("noidle\n");
+ }
+ },
+ )->start
+ );
+