]> 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 6ee3abb1e27bed242d84ca069e827025e8370e15..94b2aed4db632c597eac684057e26264f80859eb 100644 (file)
@@ -17,8 +17,8 @@ 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
 }