summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/astal.vala15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/astal.vala b/src/astal.vala
index 3ed705d..6868a7e 100644
--- a/src/astal.vala
+++ b/src/astal.vala
@@ -192,11 +192,11 @@ public class Application : Gtk.Application {
}
}
- construct {
+ public new void quit() throws DBusError, IOError {
if (instance_name == null)
instance_name = "astal";
- shutdown.connect(() => {
+ if (service != null) {
if (FileUtils.test(socket_path, GLib.FileTest.EXISTS)){
try {
File.new_for_path(socket_path).delete(null);
@@ -204,17 +204,18 @@ public class Application : Gtk.Application {
warning(err.message);
}
}
- });
+ }
+
+ base.quit();
+ }
+ construct {
+ shutdown.connect(() => { try { quit(); } catch(Error err) {} });
Unix.signal_add(1, () => { try { quit(); } catch(Error err) {} }, Priority.HIGH);
Unix.signal_add(2, () => { try { quit(); } catch(Error err) {} }, Priority.HIGH);
Unix.signal_add(15, () => { try { quit(); } catch(Error err) {} }, Priority.HIGH);
}
- public new void quit() throws DBusError, IOError {
- base.quit();
- }
-
public static List<string> get_instances() {
var list = new List<string>();
var prefix = "io.Astal.";