From 69a839362deecd86771f306f20ff993f9c9c07c1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 10 Aug 2022 15:58:01 +0000 Subject: daemon: rely on $SIG{__WARN__} for error output 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. --- lib/PublicInbox/DS.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/DS.pm') 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}: -- cgit v1.2.3-24-ge0c7