summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-03-16 12:42:59 +0000
committerAndrew Clayton <a.clayton@nginx.com>2023-03-17 04:28:46 +0000
commit7d0ceb82c71b9fc2c2884d2eeaba87fb546ef92b (patch)
tree94b7641cc80738617dc11358e2fb2329bb5a789f
parent2e3e1c7e7bd5ee177b2703fa3d261fe51164426f (diff)
downloadunit-7d0ceb82c71b9fc2c2884d2eeaba87fb546ef92b.tar.gz
unit-7d0ceb82c71b9fc2c2884d2eeaba87fb546ef92b.tar.bz2
Improve an error message regarding Unix domain sockets.
When starting unit, if its Unix domain control socket was already active you would get an error message like 2023/03/15 18:07:55 [alert] 53875#8669650 connect(5, unix:/tmp/control.sock) succeed, address already in use which is confusing in a couple of regards, firstly we have the classic success/failure message and secondly 'address already in use' is an actual errno value, EADDRINUSE and we didn't get an error from this connect(2). Re-word this error message for greater clarity. Reported-by: Liam Crilly <liam.crilly@nginx.com> Cc: Liam Crilly <liam.crilly@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r--src/nxt_listen_socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_listen_socket.c b/src/nxt_listen_socket.c
index f10abdef..d477eef1 100644
--- a/src/nxt_listen_socket.c
+++ b/src/nxt_listen_socket.c
@@ -161,7 +161,7 @@ nxt_listen_socket_create(nxt_task_t *task, nxt_mp_t *mp,
nxt_socket_close(task, ts);
if (ret == 0) {
- nxt_alert(task, "connect(%d, %*s) succeed, address already in use",
+ nxt_alert(task, "connect(%d, %*s) socket already in use",
ts, (size_t) orig_sa->length,
nxt_sockaddr_start(orig_sa));