From 6d6f4904aaa5047370949093cd63d0fc2a4a83b8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 13 Dec 2013 05:13:31 +0100 Subject: bus: when a connection terminated use ECONNRESET as error --- src/libsystemd-bus/sd-bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3-54-g00ecf