about summary refs log tree commit homepage
path: root/lib/PublicInbox/InboxIdle.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/InboxIdle.pm')
-rw-r--r--lib/PublicInbox/InboxIdle.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/InboxIdle.pm b/lib/PublicInbox/InboxIdle.pm
index c19b8d18..d60d4f23 100644
--- a/lib/PublicInbox/InboxIdle.pm
+++ b/lib/PublicInbox/InboxIdle.pm
@@ -58,7 +58,10 @@ sub new {
                 my $sock = gensym;
                 tie *$sock, 'PublicInbox::In2Tie', $inot;
                 $inot->blocking(0);
-                $inot->on_overflow(undef); # broadcasts everything on overflow
+                if ($inot->can('on_overflow')) {
+                         # broadcasts everything on overflow
+                        $inot->on_overflow(undef);
+                }
                 $self->SUPER::new($sock, EPOLLIN | EPOLLET);
         } else {
                 require PublicInbox::FakeInotify;