diff --git a/lib/AnyEvent/I3.pm b/lib/AnyEvent/I3.pm index 6b8f905b..6c7dbd12 100644 --- a/lib/AnyEvent/I3.pm +++ b/lib/AnyEvent/I3.pm @@ -147,6 +147,7 @@ sub connect { for my $type (keys %{$cb}) { next if ($type & $event_mask) == $event_mask; $cb->{$type}->(); + delete $cb->{$type}; } # Trigger _error callback, if set