Commit 4fab1e66 authored by Pavel Vainerman's avatar Pavel Vainerman

(RSExchange): попытка исправить задержку возникающую при обмене.

parent ed152269
...@@ -145,7 +145,7 @@ void MBTCPMaster::poll_thread() ...@@ -145,7 +145,7 @@ void MBTCPMaster::poll_thread()
{ {
try try
{ {
if( sidExchangeMode != DefaultObjectId && force_out ) if( sidExchangeMode != DefaultObjectId && force )
exchangeMode = shm->localGetValue(aitExchangeMode,sidExchangeMode); exchangeMode = shm->localGetValue(aitExchangeMode,sidExchangeMode);
} }
catch(...){} catch(...){}
......
...@@ -157,15 +157,12 @@ void RTUExchange::step() ...@@ -157,15 +157,12 @@ void RTUExchange::step()
{ {
try try
{ {
if( sidExchangeMode != DefaultObjectId && force_out ) if( sidExchangeMode != DefaultObjectId && force )
exchangeMode = shm->localGetValue(aitExchangeMode,sidExchangeMode); exchangeMode = shm->localGetValue(aitExchangeMode,sidExchangeMode);
} }
catch(...){} catch(...){}
{
uniset_mutex_lock l(pollMutex,2000);
poll(); poll();
}
MBExchange::step(); MBExchange::step();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment