Add new monotonic_now() wrapper so that timeouts are unaffected by

system clock changes
This commit is contained in:
Matt Johnston
2014-03-13 23:50:09 +08:00
parent 2b599df57a
commit e767bbb41f
9 changed files with 61 additions and 9 deletions

View File

@@ -397,8 +397,7 @@ void send_msg_ignore() {
static void checktimeouts() {
time_t now;
now = time(NULL);
now = monotonic_now();
if (ses.connect_time != 0 && now - ses.connect_time >= AUTH_TIMEOUT) {
dropbear_close("Timeout before auth");