'tickets' can use 'threads' now
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@706 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -151,7 +151,8 @@ IndexId::iterator i;
|
||||
if( i == index_id.end() )
|
||||
{
|
||||
i = index_id.begin();
|
||||
WaitForSignalSleep(30);
|
||||
WaitForSignalSleep(10);
|
||||
//WaitForSignalSleep(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -186,19 +187,24 @@ return outdated;
|
||||
// it's called from the other thread (with Lock and Unlock)
|
||||
void SessionContainer::DeleteSession(SessionContainer::IndexId::iterator i)
|
||||
{
|
||||
Session * old_session = request->session;
|
||||
Session * old_session = 0;
|
||||
Session * del_session = &(*i->second);
|
||||
|
||||
request->session = &(*i->second);
|
||||
if( del_session != request->session )
|
||||
old_session = request->session;
|
||||
|
||||
//log << log3 << "SessionContainer: deleting outdated session, id: " << i->second->id << logend;
|
||||
request->session = del_session;
|
||||
|
||||
if( i->second->puser )
|
||||
last_container->UserLogout(i->second->puser->id, i->second->id);
|
||||
log << log4 << "SessionContainer: deleting outdated session, id: " << del_session->id << logend;
|
||||
|
||||
if( del_session->puser )
|
||||
last_container->UserLogout(del_session->puser->id, del_session->id);
|
||||
|
||||
table.erase(i->second);
|
||||
index_id.erase(i);
|
||||
table_size -= 1;
|
||||
|
||||
// !! tu moze byc zero
|
||||
request->session = old_session;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user