diff options
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r-- | lib/PublicInbox/NNTP.pm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index ef01f448..ceaf05f6 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -72,9 +72,8 @@ sub process_line ($$) { my $res = eval { $req->($self, @args) }; my $err = $@; if ($err && $self->{sock}) { - local $/ = "\n"; - chomp($l); - err($self, 'error from: %s (%s)', $l, $err); + $l =~ s/\r?\n//s; + warn("error from: $l ($err)\n"); $res = \"503 program fault - command not performed\r\n"; } defined($res) ? $self->write($res) : 0; @@ -945,11 +944,6 @@ sub cmd_xpath ($$) { '223 '.join(' ', sort(@paths))."\r\n"; } -sub err ($$;@) { - my ($self, $fmt, @args) = @_; - printf { $self->{nntpd}->{err} } $fmt."\n", @args; -} - sub out ($$;@) { my ($self, $fmt, @args) = @_; printf { $self->{nntpd}->{out} } $fmt."\n", @args; |