lib/instana/backend/host_agent.rb in instana-1.215.0 vs lib/instana/backend/host_agent.rb in instana-1.215.1
- old
+ new
@@ -26,10 +26,14 @@
alias start spawn_background_thread
def announce
@client = until_not_nil { HostAgentLookup.new.call }
- @discovery.delete_observers
+ begin
+ @discovery.send(:observers)&.send(:notify_and_delete_observers, Time.now, nil, nil)
+ ensure
+ @discovery.delete_observers
+ end
@discovery
.with_observer(HostAgentActivationObserver.new(@client, @discovery))
.with_observer(HostAgentReportingObserver.new(@client, @discovery))
@discovery.swap { nil }