Bugfixes part 3 #209
@@ -1235,8 +1235,13 @@ void PIConnection::Sender::tick(int) {
|
|||||||
// piCoutObj << "write"<<data.size()<<"bytes to"<<devices.size()<<"devices";
|
// piCoutObj << "write"<<data.size()<<"bytes to"<<devices.size()<<"devices";
|
||||||
for (PIIODevice * d: devices) {
|
for (PIIODevice * d: devices) {
|
||||||
int ret = d->write(data);
|
int ret = d->write(data);
|
||||||
PIDiagnostics * diag = parent->diags_.value(d, nullptr);
|
if (ret > 0) {
|
||||||
if (diag && ret > 0) diag->sended(ret);
|
PIDiagnostics * diag = nullptr;
|
||||||
|
__device_pool__->lock();
|
||||||
|
diag = parent->diags_.value(d, nullptr);
|
||||||
|
__device_pool__->unlock();
|
||||||
|
if (diag) diag->sended(ret);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user