Commit 14b8df1
committed
CES-2235 Delay publication of the Charon service to the bus
Tweak the initialization order of the Charon DBus service. We should
initially create the `dbus.service.Object` *without* claiming a
well-known name on the bus. If we immediately claim a name within the
`FileService.__init__()` initializer, the DBus service will (briefly)
become visible on the DBus bus in a half-initialized state. The symptom
of this is clients seeing empty or incomplete introspection data on
`nl.ultimaker.charon`.
If, instead, we first allow `FileService` to completely finish its
`__init__()`, and then separately claim the well-known name in
`FileService.publish()`, this publishes the service to the bus
"atomically".1 parent 0d18ba7 commit 14b8df1
2 files changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | | - | |
24 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
30 | 46 | | |
31 | 47 | | |
32 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
0 commit comments