Avoid adding non-existent children to our internal list.

This really only affects testing where we might be returning nil after a
push_single expectation has been met
This commit is contained in:
R. Tyler Croy 2014-10-14 10:19:10 -07:00
parent beb8c4764d
commit b0d3bbffe3
1 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,9 @@ module Hermann
if RUBY_PLATFORM == "java"
result = @internal.push_single(value, topic)
@children << result
unless result.nil?
@children << result
end
# Reaping children on the push just to make sure that it does get
# called correctly and we don't leak memory
reap_children