lib/instana/agent.rb in instana-0.14.2 vs lib/instana/agent.rb in instana-0.15.0
- old
+ new
@@ -61,9 +61,13 @@
# the host agent.
#
def after_fork
::Instana.logger.agent "after_fork hook called. Falling back to unannounced state and spawning a new background agent thread."
+ # Reseed the random number generator for this
+ # new thread.
+ srand
+
# Re-collect process information post fork
@process = ::Instana::Util.collect_process_info
transition_to(:unannounced)
setup