summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shared/dbus-common.c2
-rw-r--r--src/systemctl/systemctl.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c
index f579567321..c727cae7cd 100644
--- a/src/shared/dbus-common.c
+++ b/src/shared/dbus-common.c
@@ -1383,6 +1383,8 @@ int bus_method_call_with_reply(
r = -EACCES;
else if (dbus_error_has_name(&error, DBUS_ERROR_NO_REPLY))
r = -ETIMEDOUT;
+ else if (dbus_error_has_name(&error, DBUS_ERROR_DISCONNECTED))
+ r = -ECONNRESET;
else
r = -EIO;
goto finish;
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index e3818cd6df..d25b7d6fae 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3938,9 +3938,9 @@ static int daemon_reload(DBusConnection *bus, char **args) {
/* There's always a fallback possible for
* legacy actions. */
r = -EADDRNOTAVAIL;
- else if (r == -ETIMEDOUT && streq(method, "Reexecute"))
- /* On reexecution, we expect a disconnect, not
- * a reply */
+ else if ((r == -ETIMEDOUT || r == -ECONNRESET) && streq(method, "Reexecute"))
+ /* On reexecution, we expect a disconnect, not a
+ * reply */
r = 0;
else if (r < 0)
log_error("Failed to issue method call: %s", bus_error_message(&error));