From c0a8cd61ee81bb1403a0980c6ecaab01eaef92d8 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Wed, 23 May 2012 11:48:10 -0400 Subject: [PATCH] More graceful quit sequence when UDP is firewalled. --- src/frontend/stmclient.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/stmclient.cc b/src/frontend/stmclient.cc index 9ba2535..0429fcd 100644 --- a/src/frontend/stmclient.cc +++ b/src/frontend/stmclient.cc @@ -112,7 +112,7 @@ void STMClient::shutdown( void ) } if ( still_connecting() ) { - fprintf( stderr, "mosh did not make a successful connection to %s:%d.\n", ip.c_str(), port ); + fprintf( stderr, "\nmosh did not make a successful connection to %s:%d.\n", ip.c_str(), port ); fprintf( stderr, "Please verify that UDP port %d is not firewalled and can reach the server.\n\n", port ); fprintf( stderr, "(By default, mosh uses a UDP port between 60000 and 61000. The -p option\nselects a specific UDP port number.)\n" ); } else if ( network ) { @@ -388,6 +388,7 @@ void STMClient::main( void ) && (timestamp() - network->get_latest_remote_state().timestamp > 250) ) { if ( timestamp() - network->get_latest_remote_state().timestamp > 15000 ) { if ( !network->shutdown_in_progress() ) { + overlays.get_notification_engine().set_notification_string( wstring( L"Timed out waiting for server, exiting..." ), true ); network->start_shutdown(); } }