about summary refs log tree commit homepage
path: root/lib/PublicInbox/Git.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-08-27 07:51:25 +0000
committerEric Wong <e@yhbt.net>2020-08-27 22:33:18 +0000
commitb80dccff433cc529040e3c11604d76f669570511 (patch)
tree246615c45e7689c7eccc22a99987d3719bf397fa /lib/PublicInbox/Git.pm
parent6e0659d2ae455fb28d433fd8c71b563210a3997a (diff)
downloadpublic-inbox-b80dccff433cc529040e3c11604d76f669570511.tar.gz
I'm seeing "read: Connection timed out" from in my syslog from
-httpd.  The fail() calls in PublicInbox::Git seems to be the
only code path of ours which could trigger it...

ETIMEDOUT shouldn't happen on pipes, only sockets; and all of
our socket operations are non-blocking.  So this could be
cgit-wwwhighlight-filter.lua, but that's connecting over
localhost, though on fairly loaded HW.
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r--lib/PublicInbox/Git.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 7b2ada24..181026c7 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -17,6 +17,7 @@ use File::Glob qw(bsd_glob GLOB_NOSORT);
 use Time::HiRes qw(stat);
 use PublicInbox::Spawn qw(popen_rd);
 use PublicInbox::Tmpfile;
+use Carp qw(croak);
 our @EXPORT_OK = qw(git_unquote git_quote);
 our $PIPE_BUFSIZ = 65536; # Linux default
 our $in_cleanup;
@@ -319,7 +320,7 @@ sub cat_async_abort ($) {
 sub fail {
         my ($self, $msg) = @_;
         $self->{inflight} ? cat_async_abort($self) : cleanup($self);
-        die $msg;
+        croak("git $self->{git_dir}: $msg");
 }
 
 sub popen {