summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-16 21:26:21 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-16 21:26:21 +0100
commit16ac401407959cbc62312e61c2dd76dbc3a0793b (patch)
treea03ee897a4d4b5932ec46e3b01ce8c966c784084 /src/core/socket.c
parent010b2b8d7a694e1e404e35db90e938f6a476bf2f (diff)
bus: when a busname unit refuses to activate a service it should flush the queue
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index aaaa8d6499..d6289a3169 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1475,6 +1475,13 @@ static void socket_enter_running(Socket *s, int cfd) {
/* Flush all sockets by closing and reopening them */
socket_close_fds(s);
+ r = socket_open_fds(s);
+ if (r < 0) {
+ log_warning_unit(UNIT(s)->id, "%s failed to listen on sockets: %s", UNIT(s)->id, strerror(-r));
+ socket_enter_stop_pre(s, SOCKET_FAILURE_RESOURCES);
+ return;
+ }
+
r = socket_watch_fds(s);
if (r < 0) {
log_warning_unit(UNIT(s)->id, "%s failed to watch sockets: %s", UNIT(s)->id, strerror(-r));