Fix compilation errors for TimeFilter example (#743)

This commit is contained in:
Roque 2021-03-12 01:11:29 +01:00 committed by GitHub
parent bcd8e27a36
commit ed5ceb019d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -19,13 +19,13 @@ void TimeFilter::doFilter(const HttpRequestPtr &req,
auto lastDate = req->session()->getOptional<trantor::Date>(VDate);
if (lastDate)
{
LOG_TRACE << "last:" << lastDate.value().toFormattedString(false);
LOG_TRACE << "last:" << lastDate->toFormattedString(false);
req->session()->modify<trantor::Date>(VDate,
[now](trantor::Date &vdate) {
vdate = now;
});
LOG_TRACE << "update visitDate";
if (now > lastDate.value().after(10))
if (now > lastDate->after(10))
{
// 10 sec later can visit again;
ccb();