mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-01 13:32:33 -04:00
RemoteTCPSink: Handle client disconnecting immediately.
This commit is contained in:
parent
c5efd73f6b
commit
d3584f6af2
@ -891,8 +891,11 @@ void RemoteTCPSinkSink::acceptWebConnection()
|
|||||||
// https://bugreports.qt.io/browse/QTBUG-125874
|
// https://bugreports.qt.io/browse/QTBUG-125874
|
||||||
QTimer::singleShot(200, this, [this, client] () {
|
QTimer::singleShot(200, this, [this, client] () {
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
|
if (client->isValid())
|
||||||
|
{
|
||||||
m_clients.append(new WebSocket(client));
|
m_clients.append(new WebSocket(client));
|
||||||
acceptConnection(m_clients.last());
|
acceptConnection(m_clients.last());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -912,8 +915,11 @@ void RemoteTCPSinkSink::acceptTCPConnection()
|
|||||||
|
|
||||||
QTimer::singleShot(200, this, [this, client] () {
|
QTimer::singleShot(200, this, [this, client] () {
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
|
if (client->isValid())
|
||||||
|
{
|
||||||
m_clients.append(new TCPSocket(client));
|
m_clients.append(new TCPSocket(client));
|
||||||
acceptConnection(m_clients.last());
|
acceptConnection(m_clients.last());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user