From 2f8a67acc72be9119779bf2bbb9f8a3e49c3d71a Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Mon, 26 Nov 2012 02:21:06 -0500 Subject: [PATCH] Adjust timeouts so server dies quicker, updates utmp slower --- src/frontend/mosh-server.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc index e6900ae..7613104 100644 --- a/src/frontend/mosh-server.cc +++ b/src/frontend/mosh-server.cc @@ -534,7 +534,7 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network int timeout = min( network.wait_time(), terminal.wait_time( now ) ); if ( (!network.get_remote_state_num()) || network.shutdown_in_progress() ) { - timeout = min( timeout, timeout_if_no_client ); + timeout = min( timeout, 5000 ); } /* poll for events */ @@ -682,9 +682,9 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network } #ifdef HAVE_UTEMPTER - /* update utmp if has been more than 10 seconds since heard from client */ + /* update utmp if has been more than 30 seconds since heard from client */ if ( connected_utmp ) { - if ( time_since_remote_state > 10000 ) { + if ( time_since_remote_state > 30000 ) { utempter_remove_record( host_fd ); char tmp[ 64 ];