]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/HTTPD/Async.pm
httpd/async: set O_NONBLOCK correctly
[public-inbox.git] / lib / PublicInbox / HTTPD / Async.pm
index bd1fd8faf2c1ea49569a702a16c75407ffd4220e..1de9501d18c43528e4ce634458b394d089d6eb41 100644 (file)
@@ -37,7 +37,8 @@ sub new {
                arg => $arg, # arg for $cb
                end_obj => $end_obj, # like END{}, can ->event_step
        }, $class;
-       IO::Handle::blocking($io, 0);
+       my $pp = tied *$io;
+       $pp->{fh}->blocking(0) // die "$io->blocking(0): $!";
        $self->SUPER::new($io, EPOLLIN | EPOLLET);
 }