From f41dc46f6213661ba51443d6cb0d6a9ba4d41472 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 24 Jun 2019 02:52:18 +0000 Subject: ds: set event flags directly at initialization We can avoid the EPOLL_CTL_ADD && EPOLL_CTL_MOD sequence with a single EPOLL_CTL_ADD. --- lib/PublicInbox/HTTPD/Async.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/HTTPD') diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm index 46ea188c..dae62e55 100644 --- a/lib/PublicInbox/HTTPD/Async.pm +++ b/lib/PublicInbox/HTTPD/Async.pm @@ -25,10 +25,9 @@ sub new { my $self = fields::new($class); IO::Handle::blocking($io, 0); - $self->SUPER::new($io); + $self->SUPER::new($io, PublicInbox::DS::EPOLLIN()); $self->{cb} = $cb; $self->{cleanup} = $cleanup; - $self->watch_read(1); $self; } -- cgit v1.2.3-24-ge0c7