Browse files

Adjust timeouts so server dies quicker, updates utmp slower

  • Loading branch information...
1 parent 486325e commit 2f8a67acc72be9119779bf2bbb9f8a3e49c3d71a @keithw keithw committed Nov 26, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/frontend/mosh-server.cc
View
6 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 ];

0 comments on commit 2f8a67a

Please sign in to comment.