X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fsocket.c;h=d6289a31693b2cfeb4b0680d789f1dca7e43f3b9;hp=aaaa8d6499b94da2f8e864fcaeb936dc8a107ec5;hb=d003f514dab2dbf1a66e11800a50aeaf039d036c;hpb=e821075a23fdfa3ca7738fc30bb2d4c430fe10c0 diff --git a/src/core/socket.c b/src/core/socket.c index aaaa8d649..d6289a316 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));