forked from cromer/pamac-classic
add timeout to let the time to the daemon to correctly quit after auto refresh
This commit is contained in:
parent
e4b6528b86
commit
c7f42208c0
@ -64,14 +64,20 @@ bool check_pamac_running () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void on_refresh_finished () {
|
void on_refresh_finished () {
|
||||||
if (!check_pamac_running ()) {
|
Timeout.add (1000, () => {
|
||||||
try {
|
if (!check_pamac_running ()) {
|
||||||
pamac_daemon.quit ();
|
try {
|
||||||
} catch (IOError e) {
|
pamac_daemon.quit ();
|
||||||
stderr.printf ("IOError: %s\n", e.message);
|
} catch (IOError e) {
|
||||||
|
stderr.printf ("IOError: %s\n", e.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
Timeout.add (100, () => {
|
||||||
loop.quit ();
|
loop.quit ();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
int main () {
|
int main () {
|
||||||
|
Loading…
Reference in New Issue
Block a user