--- loncom/auth/lonauth.pm 2011/05/13 01:33:02 1.112 +++ loncom/auth/lonauth.pm 2011/06/11 17:50:35 1.114 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.112 2011/05/13 01:33:02 raeburn Exp $ +# $Id: lonauth.pm,v 1.114 2011/06/11 17:50:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -274,7 +274,8 @@ sub handler { my $tmpinfo=Apache::lonnet::reply('tmpget:'.$form{'logtoken'}, $form{'serverid'}); - if (($tmpinfo=~/^error/) || ($tmpinfo eq 'con_lost')) { + if (($tmpinfo=~/^error/) || ($tmpinfo eq 'con_lost') || + ($tmpinfo eq 'no_such_host')) { &failed($r,'Information needed to verify your login information is missing, inaccessible or expired.',\%form); return OK; } else { @@ -421,7 +422,7 @@ sub handler { if ($r->dir_config("lonBalancer") eq 'yes') { &success($r,$form{'uname'},$form{'udom'},$authhost,'noredirect',undef, \%form); - my ($otherserver) = &Apache::lonnet::choose_server($form{'udom'}); + my $otherserver = &Apache::lonnet::spareserver(30000,undef,1,$form{'udom'}); $r->internal_redirect('/adm/switchserver?otherserver='.$otherserver.'&origurl='.$firsturl); return OK; } else {