bus: when a busname unit refuses to activate a service it should flush the queue

This commit is contained in:
Lennart Poettering
2013-12-16 21:26:21 +01:00
parent 010b2b8d7a
commit 16ac401407
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -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));