mirror of
https://github.com/cockpit-project/cockpit.git
synced 2026-11-03 21:49:50 -09:00
cockpit-tls: don't warn on EACCES when connecting to ws socket
systemd can racily set up the instance socket. There is a window during which connecting to the socket fails with EACCES. Like ENOENT and ECONNREFUSED, this is transient and resolved by retrying, so don't warn about it.
This commit is contained in:
parent
0f8fc00f3b
commit
ac6d0f36c8
1 changed files with 2 additions and 1 deletions
|
|
@ -426,7 +426,8 @@ connection_connect_to_dynamic_wsinstance (Connection *self)
|
|||
if (af_unix_connectat (self->ws_fd, parameters.wsinstance_sockdir, sockname) == 0)
|
||||
return true;
|
||||
|
||||
if (errno != ENOENT && errno != ECONNREFUSED)
|
||||
/* EACCES: systemd does not atomically set the socket's permissions before we try to connect to it */
|
||||
if (errno != ENOENT && errno != ECONNREFUSED && errno != EACCES)
|
||||
warn ("connect(%s) failed on the first attempt", sockname);
|
||||
|
||||
debug (CONNECTION, " -> failed (%m). Requesting activation.");
|
||||
|
|
|
|||
Loading…
Reference in a new issue