From 7974bba281048792fe491ef5cab88f246e5d470e Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 25 Feb 2009 17:19:57 +0000 Subject: warn that connection failed after timeout (instead of just hiding wait message) --- lib/network/connection_manager.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/network') diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm index d6dd3cb..c44bb63 100644 --- a/lib/network/connection_manager.pm +++ b/lib/network/connection_manager.pm @@ -213,7 +213,15 @@ sub start_connection { $cmanager->update_on_status_change; if ($cmanager->{wait_message_timeout}) { $cmanager->{wait_message} = $wait; - Glib::Timeout->add($cmanager->{wait_message_timeout}, sub { undef $cmanager->{wait_message} }); + Glib::Timeout->add($cmanager->{wait_message_timeout}, + sub { + if ($cmanager->{wait_message}) { + undef $cmanager->{wait_message}; + $cmanager->{in}->ask_warn(N("Error"), N("Connection failed.")) + if !$cmanager->{connection}->get_status; + } + undef; + }); }; } -- cgit v1.2.1