Stop thread if still running in destructor
Threads addressed in this commit: - Transmitter (txThread, txStats) - Capturer - EmulXcvr
This commit is contained in:
parent
cf84060277
commit
f185ceb206
@ -401,6 +401,8 @@ PcapPort::PortCapturer::PortCapturer(const char *device)
|
||||
|
||||
PcapPort::PortCapturer::~PortCapturer()
|
||||
{
|
||||
if (isRunning())
|
||||
stop();
|
||||
capFile_.close();
|
||||
}
|
||||
|
||||
@ -549,6 +551,7 @@ PcapPort::EmulationTransceiver::EmulationTransceiver(const char *device,
|
||||
|
||||
PcapPort::EmulationTransceiver::~EmulationTransceiver()
|
||||
{
|
||||
if (isRunning())
|
||||
stop();
|
||||
}
|
||||
|
||||
@ -738,7 +741,7 @@ void PcapPort::EmulationTransceiver::stop()
|
||||
QThread::msleep(10);
|
||||
}
|
||||
else {
|
||||
qWarning("Receive stop requested but is not running!");
|
||||
qWarning("Emulation Xcvr stop requested but is not running!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ PcapTransmitter::PcapTransmitter(
|
||||
|
||||
PcapTransmitter::~PcapTransmitter()
|
||||
{
|
||||
if (txThread_.isRunning())
|
||||
txThread_.stop();
|
||||
if (txStats_.isRunning())
|
||||
txStats_.stop();
|
||||
}
|
||||
|
||||
bool PcapTransmitter::setRateAccuracy(
|
||||
|
Loading…
Reference in New Issue
Block a user