From e9cec9873b585f2552e2bf9bcbcc44de34caa53d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 4 Jan 2016 20:18:46 +0000 Subject: listener: pass accepted address to post_accept We can avoid making getpeername syscalls this way. --- public-inbox-nntpd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'public-inbox-nntpd') diff --git a/public-inbox-nntpd b/public-inbox-nntpd index 1f0cd377..706cbee4 100755 --- a/public-inbox-nntpd +++ b/public-inbox-nntpd @@ -11,8 +11,8 @@ require PublicInbox::NNTP; require PublicInbox::Config; my $nntpd = PublicInbox::NNTPD->new; daemon_run('0.0.0.0:119', - sub { $nntpd->refresh_groups }, - sub ($) { PublicInbox::NNTP->new($_[0], $nntpd) }); + sub { $nntpd->refresh_groups }, # refresh + sub ($$) { PublicInbox::NNTP->new($_[0], $nntpd) }); # post_accept 1; package PublicInbox::NNTPD; -- cgit v1.2.3-24-ge0c7