PIBroadcast fix
This commit is contained in:
@@ -58,7 +58,7 @@ PIBroadcast::PIBroadcast(bool send_only): PIThread(), PIEthUtilBase() {
|
||||
|
||||
PIBroadcast::~PIBroadcast() {
|
||||
PIThread::stopAndWait();
|
||||
mcast_mutex.unlock();
|
||||
// mcast_mutex.unlock();
|
||||
destroyAll();
|
||||
}
|
||||
|
||||
@@ -202,10 +202,10 @@ void PIBroadcast::initAll(PIVector<PINetworkAddress> al) {
|
||||
|
||||
|
||||
void PIBroadcast::send(const PIByteArray & data) {
|
||||
if (!isRunning()) {
|
||||
/*if (!isRunning()) {
|
||||
reinit();
|
||||
PIThread::start(3000);
|
||||
}
|
||||
}*/
|
||||
PIByteArray cd = cryptData(data);
|
||||
if (cd.isEmpty()) return;
|
||||
PIMutexLocker ml(mcast_mutex);
|
||||
|
||||
@@ -635,6 +635,7 @@ bool PIThread::startOnce() {
|
||||
|
||||
|
||||
void PIThread::terminate() {
|
||||
piCoutObj << "Warning, terminate!";
|
||||
// PICout(PICoutManipulators::DefaultControls) << "thread" << this << "terminate ..." << running_;
|
||||
#ifdef FREERTOS
|
||||
PICout(PICoutManipulators::DefaultControls) << "FreeRTOS can't terminate pthreads! waiting for stop";
|
||||
|
||||
Reference in New Issue
Block a user