summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-08 16:00:31 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-08 16:04:58 +0100
commit70c9a897079fef31c9cfb8cb390387e0ea0330b3 (patch)
tree6b6cf39da1375f2b3df667112d1eeda824cf93cc /Kernel
parent3891e6d7397ed1cebca5e4675307874ef75286ce (diff)
downloadserenity-70c9a897079fef31c9cfb8cb390387e0ea0330b3.zip
IPv4: Put some TCP close handshake debug spam behind TCP_SOCKET_DEBUG
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Net/TCPSocket.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp
index 618aa3797f..e31ccc0362 100644
--- a/Kernel/Net/TCPSocket.cpp
+++ b/Kernel/Net/TCPSocket.cpp
@@ -441,7 +441,9 @@ bool TCPSocket::protocol_is_disconnected() const
void TCPSocket::shut_down_for_writing()
{
if (state() == State::Established) {
+#ifdef TCP_SOCKET_DEBUG
dbg() << " Sending FIN/ACK from Established and moving into FinWait1";
+#endif
send_tcp_packet(TCPFlags::FIN | TCPFlags::ACK);
set_state(State::FinWait1);
} else {
@@ -453,7 +455,9 @@ void TCPSocket::close()
{
IPv4Socket::close();
if (state() == State::CloseWait) {
+#ifdef TCP_SOCKET_DEBUG
dbg() << " Sending FIN from CloseWait and moving into LastAck";
+#endif
send_tcp_packet(TCPFlags::FIN | TCPFlags::ACK);
set_state(State::LastAck);
}