diff options
author | Valentin Bartenev <vbart@nginx.com> | 2020-04-08 15:15:24 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2020-04-08 15:15:24 +0300 |
commit | 555d595f38801685f95f140f85b20f5dcfaa49cd (patch) | |
tree | bd0e17520d0ed6d3cb1a40195181949bd5464619 /src/nxt_socket.c | |
parent | 27c1e268563da002e57f34032499efd7543b8b9d (diff) | |
download | unit-555d595f38801685f95f140f85b20f5dcfaa49cd.tar.gz unit-555d595f38801685f95f140f85b20f5dcfaa49cd.tar.bz2 |
Removed unused code related to testing of address binding.
Diffstat (limited to 'src/nxt_socket.c')
-rw-r--r-- | src/nxt_socket.c | 13 |
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; } |