From 441d56a12a90bbb5f6e58717a1e6b9bfe5c82efc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 12 Jan 2014 10:56:40 +0800 Subject: bus: properly handle EOF error conditions in proxyd EOF is not an error so we should not print an error message about it. --- src/bus-proxyd/bus-proxyd.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/bus-proxyd') diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c index a14d7c822..f4d6fab40 100644 --- a/src/bus-proxyd/bus-proxyd.c +++ b/src/bus-proxyd/bus-proxyd.c @@ -608,8 +608,13 @@ int main(int argc, char *argv[]) { k = sd_bus_send(b, m, NULL); if (k < 0) { - r = k; - log_error("Failed to send message: %s", strerror(-r)); + if (k == -ECONNRESET) + r = 0; + else { + r = k; + log_error("Failed to send message: %s", strerror(-r)); + } + goto finish; } } @@ -653,8 +658,13 @@ int main(int argc, char *argv[]) { k = sd_bus_send(a, m, NULL); if (k < 0) { - r = k; - log_error("Failed to send message: %s", strerror(-r)); + if (r == -ECONNRESET) + r = 0; + else { + r = k; + log_error("Failed to send message: %s", strerror(-r)); + } + goto finish; } } -- cgit v1.2.3