/kernel/trunk/network/tcp_subr.inc |
---|
185,9 → 185,22 |
cmp [eax + TCP_SOCKET.t_state], TCPS_ESTABLISHED |
jb tcp_close ; Connection not yet synchronised, just get rid of the socket |
test [eax + SOCKET.options], SO_LINGER |
jz .nolinger |
; TODO: implement LINGER |
; cmp [eax + SOCKET.so_linger], 0 |
; je TCP_drop |
.nolinger: |
call socket_is_disconnecting |
push eax |
add eax, STREAM_SOCKET.rcv |
mov ecx, [eax + RING_BUFFER.size] |
call socket_ring_free |
pop eax |
call tcp_usrclosed |
test eax, eax |