]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Listener.pm
www_stream: fix search for new.html endpoint
[public-inbox.git] / lib / PublicInbox / Listener.pm
index 67817d9f8ef356560703a2a5b8477b0d2cb45d76..5f351a775e7bdb227fc6946036ac51ef349774cb 100644 (file)
@@ -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 (accept(my $c, $self->{sock})) {
+       if (my $addr = accept(my $c, $sock)) {
                IO::Handle::blocking($c, 0); # no accept4 :<
-               $self->{post_accept}->($c);
+               $self->{post_accept}->($c, $addr, $sock);
        }
 }