summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-13 05:13:31 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-13 15:30:12 +0100
commit6d6f4904aaa5047370949093cd63d0fc2a4a83b8 (patch)
treecbcdac7534e1391b77eb65415565f0b9eb211f56 /src/libsystemd-bus
parent1e05d493b729beaa947b449a60ed387ee77e5da7 (diff)
bus: when a connection terminated use ECONNRESET as error
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/sd-bus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 9ab4367819..932bf226c5 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -2236,9 +2236,11 @@ _public_ int sd_bus_process(sd_bus *bus, sd_bus_message **ret) {
switch (bus->state) {
case BUS_UNSET:
- case BUS_CLOSED:
return -ENOTCONN;
+ case BUS_CLOSED:
+ return -ECONNRESET;
+
case BUS_OPENING:
r = bus_socket_process_opening(bus);
if (r == -ECONNRESET || r == -EPIPE || r == -ESHUTDOWN) {