Support #2201
closedTimeout after changing system time via webpage
0%
Description
wt-3.3.1-rc1
Having a simple page with a WDatePicker, a WLineEdit for the actual time and a button for setting the system time.
The code for setting the system time looks like this:
cmdStr = "/bin/date -s \""+datePicker->date().toString("yyyyMMdd").toUTF8() + " "
+ timeEdit->text().toUTF8()+"\"";
system(cmdStr.c_str());
If the button is pressed the code for setting the system time is executed and working.
If the time is set to the past everything is working fine. If the time is set to the future the session is restarted.
In the wtlog following entries are found.
[2013-Sep-11 14:42:19.485727] 3030 [/ A1uI3m2cxm49i5fTHf7aKHPVKLgkARnq] [info] "WebRequest: took 56.749ms"
[2013-Sep-11 16:42:03.542288] 3030 [/ A1uI3m2cxm49i5fTHf7aKHPVKLgkARnq] [info] "WebController: timeout: expiring"
[2013-Sep-11 16:42:03.549755] 3030 - [info] "WebRequest: took 7.18407e+06ms"
[2013-Sep-11 16:42:03.565092] 3030 - [info] "Wt: session created (#sessions = 1)"
Is there a way to avoid the session timeout during the setting of the system time or to retrigger the session timeout after the time is changed?
Files
Updated by Wim Dumon about 11 years ago
- File TimeUtil.C TimeUtil.C added
- File TimeUtil.h TimeUtil.h added
- Status changed from New to Feedback
That is indeed a problem. We need to reimplement src/web/TimeUtil.C in terms of boost::chrono::steady_clock for recent boost versions.
Can you test this drop-in replacement for the src/web/TimeUtils.C and .h attached to this ticket?
BR,
Wim.
Updated by Andreas Büchin about 11 years ago
Hello Wim,
Exchanging the files helped to fix the behavior. Now the system time can be changed to the past and the future without any timeouts.
Updated by Wim Dumon about 11 years ago
- Status changed from Feedback to Resolved
Excellent. The fix is on its way to the next release.
Wim.
Updated by Koen Deforche about 11 years ago
- Status changed from Resolved to Closed