]> Sergey Matveev's repositories - public-inbox.git/commit
http|nntp: avoid recursion inside ->write
authorEric Wong <e@80x24.org>
Wed, 10 Jul 2019 06:13:59 +0000 (06:13 +0000)
committerEric Wong <e@80x24.org>
Wed, 10 Jul 2019 08:25:06 +0000 (08:25 +0000)
commit4685b1d88ffe1f18334bfdd12977ece1fe9d11ce
tree745eb7d4b0852f7eed8b1e1d50bbfb96df37eddb
parentd5615a3c28aaaa86385c400b01050177b60469a2
http|nntp: avoid recursion inside ->write

In HTTP.pm, we can use the same technique NNTP.pm uses with
long_response with the $long_cb callback and avoid storing
$pull in the per-client structure at all.  We can also reuse
the same logic to push the callback into wbuf from NNTP.

This does NOT introduce a new circular reference, but documents
it more clearly.
lib/PublicInbox/HTTP.pm
lib/PublicInbox/NNTP.pm