summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_socket.c
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2020-04-16 18:27:26 +0300
committerAndrei Belov <defan@nginx.com>2020-04-16 18:27:26 +0300
commit74f32d26b91f49d3392605e81c1597b375890b60 (patch)
treeadfc67dfc86461441bde65512f745ce27bd6ea28 /src/nxt_socket.c
parent2ff9df10ef1df43c935c870175e52473dad2c21a (diff)
parent9877087756144d3bdf343d0d4e91e1efbcc62c93 (diff)
downloadunit-74f32d26b91f49d3392605e81c1597b375890b60.tar.gz
unit-74f32d26b91f49d3392605e81c1597b375890b60.tar.bz2
Merged with the default branch.1.17.0-1
Diffstat (limited to '')
-rw-r--r--src/nxt_socket.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/nxt_socket.c b/src/nxt_socket.c
index 2a809184..cc3d7378 100644
--- a/src/nxt_socket.c
+++ b/src/nxt_socket.c
@@ -184,11 +184,8 @@ nxt_socket_sockopt_name(nxt_uint_t level, nxt_uint_t sockopt)
nxt_int_t
-nxt_socket_bind(nxt_task_t *task, nxt_socket_t s, nxt_sockaddr_t *sa,
- nxt_bool_t test)
+nxt_socket_bind(nxt_task_t *task, nxt_socket_t s, nxt_sockaddr_t *sa)
{
- nxt_err_t err;
-
nxt_debug(task, "bind(%d, %*s)", s, (size_t) sa->length,
nxt_sockaddr_start(sa));
@@ -196,14 +193,8 @@ nxt_socket_bind(nxt_task_t *task, nxt_socket_t s, nxt_sockaddr_t *sa,
return NXT_OK;
}
- err = nxt_socket_errno;
-
- if (err == NXT_EADDRINUSE && test) {
- return NXT_DECLINED;
- }
-
nxt_alert(task, "bind(%d, %*s) failed %E",
- s, (size_t) sa->length, nxt_sockaddr_start(sa), err);
+ s, (size_t) sa->length, nxt_sockaddr_start(sa), nxt_socket_errno);
return NXT_ERROR;
}