about summary refs log tree commit homepage
path: root/lib/PublicInbox/NNTP.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-02 21:50:29 +0000
committerEric Wong <e@80x24.org>2016-07-02 21:52:30 +0000
commitb830cf90a2d9787315320aa4f4640f97fb1bea87 (patch)
treee7ce30134cc32920441e599734b650572cac1099 /lib/PublicInbox/NNTP.pm
parent33cef7f24d3ddedc4cd79ee88b0bba6ed1aab4c9 (diff)
downloadpublic-inbox-b830cf90a2d9787315320aa4f4640f97fb1bea87.tar.gz
This ought to make things easier when we add TLS support.
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r--lib/PublicInbox/NNTP.pm5
1 files changed, 2 insertions, 3 deletions
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