From 9c55198635b6b53d8808cf1b3714052dbf2e5374 Mon Sep 17 00:00:00 2001 From: John Hood Date: Fri, 28 Oct 2016 02:00:20 -0400 Subject: [PATCH] Fix off-by-one error on timeouts for input history echo updates --- src/statesync/completeterminal.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/statesync/completeterminal.cc b/src/statesync/completeterminal.cc index 4688b2a..d7b7d2b 100644 --- a/src/statesync/completeterminal.cc +++ b/src/statesync/completeterminal.cc @@ -142,7 +142,7 @@ bool Complete::set_echo_ack( uint64_t now ) for ( input_history_type::const_iterator i = input_history.begin(); i != input_history.end(); i++ ) { - if ( i->second < now - ECHO_TIMEOUT ) { + if ( i->second <= now - ECHO_TIMEOUT ) { newest_echo_ack = i->first; } }