We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09eaa22 commit b9efe7eCopy full SHA for b9efe7e
newrelic/core/agent.py
@@ -746,7 +746,12 @@ def shutdown_agent(self, timeout=None):
746
self._harvest_thread.start()
747
748
if self._harvest_thread.is_alive():
749
- self._harvest_thread.join(timeout)
+ try:
750
+ self._harvest_thread.join(timeout)
751
+ except RuntimeError:
752
+ # This can occur if the application is killed while in the harvest thread,
753
+ # causing shutdown_agent to be called from within the harvest thread.
754
+ pass
755
756
757
def agent_instance():
0 commit comments