]> Sergey Matveev's repositories - public-inbox.git/commit
nntp: regexp always consumes rbuf if "\n" exists
authorEric Wong <e@80x24.org>
Sun, 8 Sep 2019 10:41:12 +0000 (10:41 +0000)
committerEric Wong <e@80x24.org>
Sun, 8 Sep 2019 10:42:12 +0000 (10:42 +0000)
commit16d96f80e55d3f40338101ee8641e03f3b4f2d64
tree63ed51c37bf17a04f5a2bda5cfe8942c7e1c5e9e
parent25cd95498bfd30f7436cdf782feec0d3ca76f837
nntp: regexp always consumes rbuf if "\n" exists

We don't want to get hung into a state where we see "\n" via
index(), yet cannot consume rbuf in the while loop.  So tweak
the regexp to ensure we always consume rbuf.

I suspect this is what causes occasional 100% CPU usage of
-nntpd, but reproducing it's been difficult..
lib/PublicInbox/NNTP.pm