diff options
Diffstat (limited to 'lib/PublicInbox/Listener.pm')
-rw-r--r-- | lib/PublicInbox/Listener.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/Listener.pm b/lib/PublicInbox/Listener.pm index 8e0554f3..5f351a77 100644 --- a/lib/PublicInbox/Listener.pm +++ b/lib/PublicInbox/Listener.pm @@ -25,11 +25,12 @@ sub new ($$$) { sub event_read { my ($self) = @_; + my $sock = $self->{sock}; # no loop here, we want to fairly distribute clients # between multiple processes sharing the same socket - if (my $addr = accept(my $c, $self->{sock})) { + if (my $addr = accept(my $c, $sock)) { IO::Handle::blocking($c, 0); # no accept4 :< - $self->{post_accept}->($c, $addr); + $self->{post_accept}->($c, $addr, $sock); } } |