diff options
-rwxr-xr-x | git-cvsimport.perl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 8e683e5478..bbf327f3e8 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -366,7 +366,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"; |