wayland: Delete X11 unix socket left after previous compositor

If the previous compositor has crashed, the unix socket will be kept
around and listen_helper() will fail.
This commit is contained in:
Vlad Zahorodnii 2022-01-17 18:48:16 +02:00
parent f23ef4c858
commit 17445d19d0

View file

@ -184,6 +184,7 @@ XwaylandSocket::XwaylandSocket(OperationMode mode)
}
});
QFile::remove(socketFilePath);
const int unixFileDescriptor = listen_helper(socketFilePath, UnixSocketAddress::Type::Unix, mode);
if (unixFileDescriptor == -1) {
QFile::remove(lockFilePath);