mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
Move from session based state to client side tokens.
YACReaderHttpSession is still used, but it is not a http session anymore.
This commit is contained in:
@ -8,9 +8,11 @@
|
||||
|
||||
YACReaderHttpSessionStore::YACReaderHttpSessionStore(HttpSessionStore *sessionStore, QObject *parent)
|
||||
: QObject(parent), sessionStore(sessionStore)
|
||||
{
|
||||
connect(&cleanupTimer,SIGNAL(timeout()),this,SLOT(sessionTimerEvent()));
|
||||
cleanupTimer.start(60000);
|
||||
{
|
||||
//sessions are no longer http sessions in v2, we need another mechanism for cleaning
|
||||
|
||||
//connect(&cleanupTimer,SIGNAL(timeout()),this,SLOT(sessionTimerEvent()));
|
||||
//cleanupTimer.start(60000);
|
||||
}
|
||||
|
||||
void YACReaderHttpSessionStore::addYACReaderHttpSession(const QByteArray &httpSessionId, YACReaderHttpSession *yacreaderHttpSession)
|
||||
@ -28,8 +30,9 @@ YACReaderHttpSession *YACReaderHttpSessionStore::getYACReaderSessionHttpSession(
|
||||
}
|
||||
|
||||
void YACReaderHttpSessionStore::sessionTimerEvent()
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
{
|
||||
//sessions are no longer http sessions in v2, we are using a token, so sessionStore->getSession(id).isNull() is always true.
|
||||
/*QMutexLocker locker(&mutex);
|
||||
for(const QByteArray &id : sessions.keys())
|
||||
{
|
||||
if(sessionStore->getSession(id).isNull())
|
||||
@ -40,5 +43,5 @@ void YACReaderHttpSessionStore::sessionTimerEvent()
|
||||
|
||||
sessions.remove(id);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user