nxt_conn_close.c (521:93dc4a28dd37) nxt_conn_close.c (564:762f8c976ead)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 32 unchanged lines hidden (view full) ---

41 * Resetting of timed out connection on close
42 * releases kernel memory associated with socket.
43 * This also causes sending TCP/IP RST to a peer.
44 */
45 ret = setsockopt(c->socket.fd, SOL_SOCKET, SO_LINGER, &linger_off,
46 sizeof(struct linger));
47
48 if (nxt_slow_path(ret != 0)) {
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 32 unchanged lines hidden (view full) ---

41 * Resetting of timed out connection on close
42 * releases kernel memory associated with socket.
43 * This also causes sending TCP/IP RST to a peer.
44 */
45 ret = setsockopt(c->socket.fd, SOL_SOCKET, SO_LINGER, &linger_off,
46 sizeof(struct linger));
47
48 if (nxt_slow_path(ret != 0)) {
49 nxt_log(c->socket.task, NXT_LOG_CRIT,
50 "setsockopt(%d, SO_LINGER) failed %E",
51 c->socket.fd, nxt_socket_errno);
49 nxt_alert(c->socket.task, "setsockopt(%d, SO_LINGER) failed %E",
50 c->socket.fd, nxt_socket_errno);
52 }
53 }
54
55 /*
56 * Event errors should be ignored here to avoid repeated nxt_conn_close()
57 * calls. nxt_conn_close_handler() or nxt_conn_close_timer_handler()
58 * will eventually close socket.
59 */

--- 106 unchanged lines hidden ---
51 }
52 }
53
54 /*
55 * Event errors should be ignored here to avoid repeated nxt_conn_close()
56 * calls. nxt_conn_close_handler() or nxt_conn_close_timer_handler()
57 * will eventually close socket.
58 */

--- 106 unchanged lines hidden ---