about summary refs log tree commit homepage
path: root/lib/PublicInbox/DS.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-08-10 15:58:01 +0000
committerEric Wong <e@80x24.org>2022-08-10 20:11:10 +0000
commit69a839362deecd86771f306f20ff993f9c9c07c1 (patch)
treeafa97ae342b24844e8702d17596f1109445df3c4 /lib/PublicInbox/DS.pm
parent1c457e08d2bb3352bdddde0a3580ff37f317cc72 (diff)
downloadpublic-inbox-69a839362deecd86771f306f20ff993f9c9c07c1.tar.gz
warn/carp usage is unavoidable given Perl itself and standard
libraries, so just rely on localized $SIG{__WARN__} from
60d262483a4d6ddf (daemon: use per-listener SIG{__WARN__} callbacks, 2022-08-08)
for all error reporting.

While we're in the area, make some of the error handling more
consistent between IMAP/NNTP/POP3.
Diffstat (limited to 'lib/PublicInbox/DS.pm')
-rw-r--r--lib/PublicInbox/DS.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm
index 5e8a6a66..26840662 100644
--- a/lib/PublicInbox/DS.pm
+++ b/lib/PublicInbox/DS.pm
@@ -660,8 +660,8 @@ sub long_step {
         if ($@ || !$self->{sock}) { # something bad happened...
                 delete $self->{long_cb};
                 my $elapsed = now() - $t0;
-                $@ and $self->err("%s during long response[$fd] - %0.6f",
-                                    $@, $elapsed);
+                $@ and warn("$@ during long response[$fd] - ",
+                                sprintf('%0.6f', $elapsed),"\n");
                 $self->out(" deferred[$fd] aborted - %0.6f", $elapsed);
                 $self->close;
         } elsif ($more) { # $self->{wbuf}: