--- loncom/interface/lonsearchcat.pm 2002/11/22 18:36:07 1.161 +++ loncom/interface/lonsearchcat.pm 2003/01/14 18:47:50 1.163 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.161 2002/11/22 18:36:07 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.163 2003/01/14 18:47:50 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2250,8 +2250,7 @@ sub display_results { ## foreach my $row (@Results) { if ($connection->aborted()) { - untie %groupsearch_db if (tied(%groupsearch_db)); - &Apache::lonmysql::disconnect_from_db(); + &cleanup(); return; } my %Fields = %{&parse_row(@$row)}; @@ -2963,6 +2962,16 @@ sub start_fresh_session { 1; +sub cleanup { + if (tied(%groupsearch_db)) { + &Apache::lonnet::logthis('Cleanup searchcat: groupsearch_db'); + unless (untie(%groupsearch_db)) { + &Apache::lonnet::logthis('Failed cleanup searchcat: groupsearch_db'); + } + } + &Apache::lonmysql::disconnect_from_db(); +} + __END__ =pod