From: Eric Wong Date: Sat, 2 Jul 2016 21:50:29 +0000 (+0000) Subject: nntp: simplify update_idle_time X-Git-Tag: v1.0.0~318 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=b830cf90a2d9787315320aa4f4640f97fb1bea87;p=public-inbox.git nntp: simplify update_idle_time This ought to make things easier when we add TLS support. --- diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index 4b116a7d..b07e1845 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