aboutsummaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index a8140378ce1d..ba03de4c32fe 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1090,7 +1090,8 @@ soclose(struct socket *so)
goto drop;
}
}
- if (so->so_options & SO_LINGER) {
+
+ if ((so->so_options & SO_LINGER) != 0 && so->so_linger != 0) {
if ((so->so_state & SS_ISDISCONNECTING) &&
(so->so_state & SS_NBIO))
goto drop;