WindowServer: Fix fd closing
Don't close fds in Window destructor :P
This commit is contained in:
@@ -31,8 +31,6 @@ Window::~Window()
|
|||||||
total_sent += nsend;
|
total_sent += nsend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
close(m_client_fd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BAN::ErrorOr<void> Window::initialize(BAN::StringView title, uint32_t width, uint32_t height)
|
BAN::ErrorOr<void> Window::initialize(BAN::StringView title, uint32_t width, uint32_t height)
|
||||||
|
|||||||
@@ -326,6 +326,7 @@ int main()
|
|||||||
if (auto ret = window_server.add_client_fd(client_fd); ret.is_error())
|
if (auto ret = window_server.add_client_fd(client_fd); ret.is_error())
|
||||||
{
|
{
|
||||||
dwarnln("add_client: {}", ret.error());
|
dwarnln("add_client: {}", ret.error());
|
||||||
|
epoll_ctl(g_epoll_fd, EPOLL_CTL_DEL, client_fd, nullptr);
|
||||||
close(client_fd);
|
close(client_fd);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user