Merge lp:~mhr3/unity/fix-1058619 into lp:unity
Status: | Merged |
---|---|
Approved by: | Michal Hruby |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2799 |
Proposed branch: | lp:~mhr3/unity/fix-1058619 |
Merge into: | lp:unity |
Diff against target: |
86 lines (+23/-5) 1 file modified
UnityCore/GLibDBusProxy.cpp (+23/-5) |
To merge this branch: | bzr merge lp:~mhr3/unity/fix-1058619 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gord Allott (community) | Approve | ||
Review via email: mp+127955@code.launchpad.net |
Commit message
Attempt to reconnect to DBus proxies if the initial connection fails
Description of the change
Currently if connection to DBus proxy fails for whatever reason (most commonly timeout), the proxy object gives up and we can't talk to the service. This patch attempts to reconnect to the proxy up to 5 times and only after that gives up.
As this is very specific edge case it can't really be unit tested (we can't force dbus-daemon to timeout when starting a service), plus even manual test would require editing system files to ensure that a service cannot be started.
FWIW the way I tested this was to edit photo lens's dbus service file and change the Exec line to /bin/cat (cat doesn't exit immediately and therefore dbus-daemon times out the request eventually).
+1 from me