about summary refs log tree commit homepage
path: root/lib/PublicInbox/NNTP.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-27 22:28:26 +0000
committerEric Wong <e@80x24.org>2016-07-27 22:28:51 +0000
commite0b7cf5eb5e6828d07094fa44be67e2d7d63e722 (patch)
tree7e83f74f701cdbf5e6a31520871ab1457813555d /lib/PublicInbox/NNTP.pm
parent6cf4ed00cfe766141572511d4ab2016cd6dafe46 (diff)
downloadpublic-inbox-e0b7cf5eb5e6828d07094fa44be67e2d7d63e722.tar.gz
Callers may have localized $/ to something else, so make sure
we chomp the expected character(s) when calling chomp.
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r--lib/PublicInbox/NNTP.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index 5b055bca..0c61dd8a 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -125,6 +125,7 @@ sub process_line ($$) {
         my $res = eval { $req->($self, @args) };
         my $err = $@;
         if ($err && !$self->{closed}) {
+                local $/ = "\n";
                 chomp($l);
                 err($self, 'error from: %s (%s)', $l, $err);
                 $res = '503 program fault - command not performed';