feat(production): 修改订单清除按钮功能---除了清除报警、也复位状态,让订单能继续执行
This commit is contained in:
@@ -397,9 +397,14 @@ void ModbusTcpManager::abortAll(const QString &reason)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_client
|
||||
&& m_client->state() != QModbusDevice::UnconnectedState) {
|
||||
m_client->disconnectDevice();
|
||||
if (m_client) {
|
||||
// disconnectDevice completes asynchronously. A new request must not
|
||||
// reuse this client while its previous socket is still closing.
|
||||
QModbusTcpClient *client = m_client;
|
||||
m_client = nullptr;
|
||||
client->disconnect(this);
|
||||
client->disconnectDevice();
|
||||
client->deleteLater();
|
||||
}
|
||||
|
||||
m_aborting = false;
|
||||
|
||||
Reference in New Issue
Block a user