Ensure proper timer thread affinity

Since the APRS client object will be moved to another thread, ensure that its timer has a parent of the APRS client object, so that the timer is properly handled when the thread affinity changes.
This commit is contained in:
Allan Bazinet 2024-09-05 14:06:36 -07:00
parent 42cc885941
commit cbb02474c1

View file

@ -8,8 +8,11 @@
const int PACKET_TIMEOUT_SECONDS = 300;
APRSISClient::APRSISClient(QString host, quint16 port, QObject *parent):
QTcpSocket(parent)
APRSISClient::APRSISClient(QString const host,
quint16 const port,
QObject * parent)
: QTcpSocket{parent},
m_timer {this}
{
setServer(host, port);