diff --git a/server/pcapport.cpp b/server/pcapport.cpp index 7d8a4cf..6dce776 100644 --- a/server/pcapport.cpp +++ b/server/pcapport.cpp @@ -401,6 +401,8 @@ PcapPort::PortCapturer::PortCapturer(const char *device) PcapPort::PortCapturer::~PortCapturer() { + if (isRunning()) + stop(); capFile_.close(); } @@ -549,7 +551,8 @@ PcapPort::EmulationTransceiver::EmulationTransceiver(const char *device, PcapPort::EmulationTransceiver::~EmulationTransceiver() { - stop(); + if (isRunning()) + stop(); } void PcapPort::EmulationTransceiver::run() @@ -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; } } diff --git a/server/pcaptransmitter.cpp b/server/pcaptransmitter.cpp index 0f16537..9e122dd 100644 --- a/server/pcaptransmitter.cpp +++ b/server/pcaptransmitter.cpp @@ -34,6 +34,10 @@ PcapTransmitter::PcapTransmitter( PcapTransmitter::~PcapTransmitter() { + if (txThread_.isRunning()) + txThread_.stop(); + if (txStats_.isRunning()) + txStats_.stop(); } bool PcapTransmitter::setRateAccuracy(