mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:14:58 +00:00
Kernel: Send only FIN when shutting down TCP socket from ESTABLISHED
We were previously sending FIN|ACK for some reason.
This commit is contained in:
parent
bf178e0196
commit
7247f0204d
1 changed files with 2 additions and 2 deletions
|
@ -501,8 +501,8 @@ bool TCPSocket::protocol_is_disconnected() const
|
|||
void TCPSocket::shut_down_for_writing()
|
||||
{
|
||||
if (state() == State::Established) {
|
||||
dbgln_if(TCP_SOCKET_DEBUG, " Sending FIN/ACK from Established and moving into FinWait1");
|
||||
[[maybe_unused]] auto rc = send_tcp_packet(TCPFlags::FIN | TCPFlags::ACK);
|
||||
dbgln_if(TCP_SOCKET_DEBUG, " Sending FIN from Established and moving into FinWait1");
|
||||
(void)send_tcp_packet(TCPFlags::FIN);
|
||||
set_state(State::FinWait1);
|
||||
} else {
|
||||
dbgln(" Shutting down TCPSocket for writing but not moving to FinWait1 since state is {}", to_string(state()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue