]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Listener.pm
ds: set event flags directly at initialization
[public-inbox.git] / lib / PublicInbox / Listener.pm
index a75a6fd9964ed1c9c2d2780b6680aa1b39ee76b2..94b2aed4db632c597eac684057e26264f80859eb 100644 (file)
@@ -17,13 +17,13 @@ sub new ($$$) {
        listen($s, 1024);
        IO::Handle::blocking($s, 0);
        my $self = fields::new($class);
-       $self->SUPER::new($s, 1); # calls epoll_create for the first socket
-       $self->watch_read(1);
+       $self->SUPER::new($s, PublicInbox::DS::EPOLLIN()|
+                             PublicInbox::DS::EPOLLEXCLUSIVE());
        $self->{post_accept} = $cb;
        $self
 }
 
-sub event_read {
+sub event_step {
        my ($self) = @_;
        my $sock = $self->{sock};