]> mj.ucw.cz Git - libucw.git/commitdiff
If the search server connection dies prematurely, give the right error
authorMartin Mares <mj@ucw.cz>
Tue, 25 Mar 2003 21:38:46 +0000 (21:38 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 25 Mar 2003 21:38:46 +0000 (21:38 +0000)
message instead of referencing an undefined variable.

lib/perl/Query.pm

index e07f64f190af131b6db9993f427feb892d0c84e0..9a8b168e79978047138394ffbd537829a5ef6fc0 100644 (file)
@@ -117,6 +117,7 @@ sub command($$) {
 
        # Status line
        my $stat = <$sock>;
+       $stat = "-903 Incomplete reply" if !defined $stat;
        chomp $stat;
        $stat =~ /^[+-]/ or return "-901 Reply parse error";