Changeset View
Changeset View
Standalone View
Standalone View
src/sys/kern/uipc_socket.c
Context not available. | |||||
CURVNET_SET(so->so_vnet); | CURVNET_SET(so->so_vnet); | ||||
funsetown(&so->so_sigio); | funsetown(&so->so_sigio); | ||||
if (so->so_state & SS_ISCONNECTED) { | if (so->so_state & SS_ISCONNECTED) { | ||||
if ((so->so_state & SS_ISDISCONNECTING) == 0) { | |||||
error = sodisconnect(so); | |||||
if (error) { | |||||
if (error == ENOTCONN) | |||||
error = 0; | |||||
goto drop; | |||||
} | |||||
} | |||||
if (so->so_options & SO_LINGER) { | if (so->so_options & SO_LINGER) { | ||||
if ((so->so_state & SS_ISDISCONNECTING) && | if ((so->so_state & SS_ISDISCONNECTING) && | ||||
(so->so_state & SS_NBIO)) | (so->so_state & SS_NBIO)) | ||||
Context not available. | |||||
break; | break; | ||||
} | } | ||||
} | } | ||||
/*actual disconnect should do after SO_LINGER option process*/ | |||||
if ((so->so_state & SS_ISDISCONNECTING) == 0) { | |||||
error = sodisconnect(so); | |||||
if (error) { | |||||
if (error == ENOTCONN) | |||||
error = 0; | |||||
goto drop; | |||||
} | |||||
} | |||||
} | } | ||||
drop: | drop: | ||||
Context not available. |