From dff4b9f555ac102fa9280a3362865eb33fd9ae5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Fri, 12 May 2017 17:30:35 +0200 Subject: Fix broken notifications when the user does a manual check too early If the user does a manual check for updates before the first automatic check has been triggered, notifications no longer work. --- mgaapplet | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mgaapplet') diff --git a/mgaapplet b/mgaapplet index 2f996598..ab1b41c4 100755 --- a/mgaapplet +++ b/mgaapplet @@ -242,9 +242,13 @@ go2State('delayed'); # will be emitted and caught above (mga#20540). Glib::Timeout->add(100, sub { $icon->set_context_menu($menu); 0 }) if $is_plasma; -Glib::Timeout->add_seconds($config{FIRST_CHECK_DELAY}/1000, sub { +Glib::Timeout->add_seconds(1, sub { POSIX::sigprocmask(SIG_UNBLOCK, POSIX::SigSet->new(SIGCHLD)); $SIG{CHLD} = \&harvester; + 0; + }); + +Glib::Timeout->add_seconds($config{FIRST_CHECK_DELAY}/1000, sub { # schedule future checks: setup_cyclic_check(); # perform a test after initial delay: -- cgit v1.2.1