From kde-commits Mon Jul 10 10:13:43 2006 From: Dirk Mueller Date: Mon, 10 Jul 2006 10:13:43 +0000 To: kde-commits Subject: icecream/services Message-Id: <1152526423.726813.9315.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=115252665711473 SVN commit 560421 by mueller: - reindent using GNU indenting rules - immediately kick broken daemon connections (thanks to Matz for noticing) M +14 -13 scheduler.cpp --- trunk/icecream/services/scheduler.cpp #560420:560421 @@ -827,19 +827,21 @@ { trace() << "send ping " << ( *it )->nodename << endl; ( *it )->max_jobs *= -1; // better not give it away - if(( *it )->send_msg( PingMsg() )) { + if(( *it )->send_msg( PingMsg() )) + { // give it a few seconds to answer a ping - ( *it )->last_talk = time( 0 ) - MAX_SCHEDULER_PING + MIN_SCHEDULER_PING; - } - } - else - { // R.I.P. - trace() << "removing " << ( *it )->nodename << endl; - CS *old = *it; - ++it; - handle_end (old, 0); - continue; - } + ( *it )->last_talk = time( 0 ) - MAX_SCHEDULER_PING + + MIN_SCHEDULER_PING; + ++it; + continue; + } + } + // R.I.P. + trace() << "removing " << ( *it )->nodename << endl; + CS *old = *it; + ++it; + handle_end (old, 0); + continue; } else min_time = min (min_time, MAX_SCHEDULER_PING - now + ( *it )->last_talk); @@ -857,7 +859,6 @@ ++it; } - /** * check the jobs that were not cared about even though they are done * (one in a million ;( */