i18n: git-submodule $update_module say + die messages
[gitweb.git] / git-cvsimport.perl
index 5c012a35d20f6925564caea2ecf3179c5b204035..8d41610bcf260545bcc5b6a8c30b43d427c70491 100755 (executable)
@@ -395,7 +395,9 @@ sub conn {
        $self->{'socketo'}->write("valid-requests\n");
        $self->{'socketo'}->flush();
 
-       chomp(my $rep=$self->readline());
+       my $rep=$self->readline();
+       die "Failed to read from server" unless defined $rep;
+       chomp($rep);
        if ($rep !~ s/^Valid-requests\s*//) {
                $rep="<unknown>" unless $rep;
                die "Expected Valid-requests from server, but got: $rep\n";