aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-06-15 00:52:01 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-06-15 00:52:01 +0200
commitea165fb59c6ffdd536ddd5c1c6e8e6a0d5f08b6b (patch)
tree9816de5537df2a19be0f478037598f765df65068
parentSeconds to test. (diff)
downloadJsonScgiQt-ea165fb59c6ffdd536ddd5c1c6e8e6a0d5f08b6b.tar.xz
JsonScgiQt-ea165fb59c6ffdd536ddd5c1c6e8e6a0d5f08b6b.zip
Whoops.
-rw-r--r--lib/JsonScgiServer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/JsonScgiServer.cpp b/lib/JsonScgiServer.cpp
index 01624e6..8b0f6ad 100644
--- a/lib/JsonScgiServer.cpp
+++ b/lib/JsonScgiServer.cpp
@@ -40,7 +40,7 @@ void JsonScgiServer::newWebRequest(const QUrl &url, QString &sessionCookie, cons
session.expiration = QDateTime();
session.data.clear();
}
- if (qAbs(session.expiration.secsTo(QDateTime::currentDateTimeUtc())) < 60 * 60)
+ if (!session.expiration.isValid() || qAbs(session.expiration.secsTo(QDateTime::currentDateTimeUtc())) < 60 * 60)
session.expiration = QDateTime::currentDateTimeUtc().addSecs(60 * 60); //Default expiration: 1 hour
emit webRequest(url, session, request, peer);