pushnotification testutils: Bind only to LocalHost

LocalHost is enough to complete the tests, and it enables the test to be
run under networksandboxing.

Signed-off-by: Thomas Witt <pyromaniac@exherbo.org>
This commit is contained in:
Thomas Witt 2024-03-30 16:17:49 +01:00 committed by Matthieu Gallien
parent 1cb798b6c7
commit 8a9de185a9

View file

@ -13,7 +13,7 @@ FakeWebSocketServer::FakeWebSocketServer(quint16 port, QObject *parent)
: QObject(parent)
, _webSocketServer(new QWebSocketServer(QStringLiteral("Fake Server"), QWebSocketServer::NonSecureMode, this))
{
if (!_webSocketServer->listen(QHostAddress::Any, port)) {
if (!_webSocketServer->listen(QHostAddress::LocalHost, port)) {
Q_UNREACHABLE();
}
connect(_webSocketServer, &QWebSocketServer::newConnection, this, &FakeWebSocketServer::onNewConnection);