From 6ea82fb5d6cd5ae6813f3700fe915ab9110086ea Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 24 Jun 2019 02:52:46 +0000 Subject: nntp: reduce allocations for greeting No need to allocate a new PerlIO::scalar filehandle for every client, instead we can now pass the same CODE reference which calls DS->write on a reused string reference. --- lib/PublicInbox/NNTPD.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/NNTPD.pm') diff --git a/lib/PublicInbox/NNTPD.pm b/lib/PublicInbox/NNTPD.pm index 6d9ffd5f..4f30c5d9 100644 --- a/lib/PublicInbox/NNTPD.pm +++ b/lib/PublicInbox/NNTPD.pm @@ -25,6 +25,7 @@ sub new { out => \*STDOUT, grouplist => [], servername => $name, + greet => \"201 $name ready - post via email\r\n", # accept_tls => { SSL_server => 1, ..., SSL_reuse_ctx => ... } }, $class; } -- cgit v1.2.3-24-ge0c7