Skip to content

Commit

Permalink
Minor: Check pid before hash
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoanjo committed Aug 7, 2024
1 parent 0c719dd commit 9cf5444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datadog/core/utils/at_fork_monkey_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _fork

pid = super

datadog_at_fork_blocks[:child].each(&:call) if datadog_at_fork_blocks.key?(:child) && pid == 0
datadog_at_fork_blocks[:child].each(&:call) if pid == 0 && datadog_at_fork_blocks.key?(:child)

pid
end
Expand Down

0 comments on commit 9cf5444

Please sign in to comment.