From b0be3299b582ab9746f86a3f8d5084f8539be73e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 17 Feb 2019 10:59:58 +0100 Subject: [PATCH] WindowServer: Close accepted sockets when the client has disconnected. --- WindowServer/WSClientConnection.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WindowServer/WSClientConnection.cpp b/WindowServer/WSClientConnection.cpp index b178a58ed1..841d58a7c9 100644 --- a/WindowServer/WSClientConnection.cpp +++ b/WindowServer/WSClientConnection.cpp @@ -49,6 +49,8 @@ WSClientConnection::WSClientConnection(int fd) WSClientConnection::~WSClientConnection() { s_connections->remove(m_client_id); + int rc = close(m_fd); + ASSERT(rc == 0); } void WSClientConnection::post_error(const String& error_message)