diff options
author | Eric Wong <e@80x24.org> | 2022-08-10 15:58:01 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-08-10 20:11:10 +0000 |
commit | 69a839362deecd86771f306f20ff993f9c9c07c1 (patch) | |
tree | afa97ae342b24844e8702d17596f1109445df3c4 /lib/PublicInbox/DS.pm | |
parent | 1c457e08d2bb3352bdddde0a3580ff37f317cc72 (diff) | |
download | public-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.pm | 4 |
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}: |