static void busname_close_fd(BusName *n) {
assert(n);
+ busname_unwatch_fd(n);
+
if (n->starter_fd <= 0)
return;
if (unit_stop_pending(UNIT(n))) {
log_debug_unit(UNIT(n)->id, "Suppressing activation request on %s since unit stop is scheduled.", UNIT(n)->id);
+
+ /* Flush all queued activation reqeuest by closing and reopening the connection */
+
+ busname_close_fd(n);
+ busname_enter_listening(n);
return;
}
/* 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));