From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 2/3] nntp: simplify update_idle_time
Date: Sat, 2 Jul 2016 21:50:29 +0000 [thread overview]
Message-ID: <20160702215030.7692-3-e@80x24.org> (raw)
In-Reply-To: <20160702215030.7692-1-e@80x24.org>
This ought to make things easier when we add TLS support.
---
lib/PublicInbox/NNTP.pm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index 4b116a7..b07e184 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -60,9 +60,8 @@ sub next_tick () {
sub update_idle_time ($) {
my ($self) = @_;
- my $tmp = $self->{sock} or return;
- $tmp = fileno($tmp);
- defined $tmp and $EXPMAP->{$tmp} = [ now(), $self ];
+ my $fd = $self->{fd};
+ defined $fd and $EXPMAP->{$fd} = [ now(), $self ];
}
# reduce FD pressure by closing some "git cat-file --batch" processes
next prev parent reply other threads:[~2016-07-02 21:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-02 21:50 [PATCH 0/3] misc NNTP improvements Eric Wong
2016-07-02 21:50 ` [PATCH 1/3] config: introduce each_inbox for iteration Eric Wong
2016-07-07 19:55 ` [PATCH 4/3] nntpd: avoid exiting subroutine via next Eric Wong
2016-07-02 21:50 ` Eric Wong [this message]
2016-07-02 21:50 ` [PATCH 3/3] nntp: respect 3 minute idle time for shutdown Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160702215030.7692-3-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).