mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-17 16:51:33 -04:00
Detect disconnection
This commit is contained in:
parent
3231dd56f1
commit
0ec1826a63
@ -164,10 +164,19 @@ void network::tcp::layer::decode(network::interface_descriptor& interface, netwo
|
||||
// Propagate to kernel connections
|
||||
|
||||
if (connection.listening.load()) {
|
||||
logging::logf(logging::log_level::TRACE, "tcp:decode: Propagated to connection\n");
|
||||
|
||||
connection.packets.push_back(packet);
|
||||
connection.queue.notify_one();
|
||||
}
|
||||
|
||||
if(connection.child && is_fin){
|
||||
logging::logf(logging::log_level::TRACE, "tcp:decode: End connection (received FIN/ACK)\n");
|
||||
|
||||
//TODO Answer to the FIN/ACK
|
||||
//TODO Wake up the thread (if any) waiting on this connection
|
||||
}
|
||||
|
||||
// Propagate to the kernel socket
|
||||
|
||||
if (is_psh && connection.socket) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user