From 921719a8719ef46f726bf304878167c76b417ea7 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Tue, 3 Dec 2013 11:27:57 +0800 Subject: [PATCH] Disconnect client if the socket hang up This patch originally for a test case failure on FreeBSD 9.1, where the socket of test/test-service will hang up, so the test case ends with timed out error. However, compare with block and wait a timed out error, just disconnect the client is reasonable if it hang up. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72251 --- dbus/dbus-transport-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index 44c7af7..e9f911d 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -1134,7 +1134,7 @@ socket_do_iteration (DBusTransport *transport, * is guaranteed on linux at least. */ - if (poll_fd.revents & _DBUS_POLLERR) + if (poll_fd.revents & (_DBUS_POLLERR | _DBUS_POLLHUP)) do_io_error (transport); else { -- 1.7.9.5