socratools / socranop

Soundcraft Notepad mixer tools for Linux
MIT License
8 stars 2 forks source link

dbus shutdown fix #41

Closed lack closed 3 years ago

lack commented 3 years ago

If we don't wait for the bus to be clear, there's a race against the possibility that the next client we start up will see this nearly-gone service instead of launching a new one as we intend. The client will also throw exceptions if that happens as the old service is removed from the bus.

lack commented 3 years ago

This messes up the beautiful socranop-installtool output

The only thing this changes from the previous output is adding the (successful attempt 3/5) on the step that was already there.

How do you want it to look?

lack commented 3 years ago

Latest commit looks like this:

Dbus service: Configuring
  [stop] Shutting down version 0.4.92: OK (successful attempt 1/5)
  [inst] /home/lack/.local/share/dbus-1/services/io.github.socratools.socranop.service
  [verify] Reload dbus to register the new service: OK
  [verify] Checking for registered service: OK
  [verify] Starting D-Bus service: 0.4.92
  [verify] Installtool version: 0.4.92
  [verify] Shutting down session D-Bus service: OK
Dbus service: Complete