Commit 6eee10fc authored by Pavel Vainerman's avatar Pavel Vainerman

Немного переделал код, где используется erase в цикле

parent 3dc76a38
......@@ -385,7 +385,7 @@ void ModbusTCPServer::sessionFinished( ModbusTCPSession* s )
{
slist.erase(i);
sessCount--;
break;
return;
}
}
}
......
......@@ -426,7 +426,7 @@ void IONotifyController::send( ConsumerListInfo& lst, UniSetTypes::SensorMessage
if( maxAttemtps>0 && --(li->attempt) <= 0 )
{
li = lst.clst.erase(li);
if( li == lst.clst.end() ) --li;
--li;
break;
}
......
......@@ -86,10 +86,10 @@ timeout_t LT_Object::checkTimers( UniSetObject* obj )
if( !li->curTick )
{
li = tlst.erase(li);
if( li == tlst.end() ) --li;
--li;
if( tlst.empty() )
sleepTime = UniSetTimer::WaitUpTime;
continue;
}
else if(li->curTick>0 )
......
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