src: close tracing event loop

Clean up resources when tearing down the tracing agent.

PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
This commit is contained in:
Anna Henningsen authored and Michaël Zasso committed 2018-08-01 21:36:02 +02:00
1 parent 4c9c1bbc45
commit 56edd5fc5b
2 files changed
+7

No files matched your search

+6
View File
@@ -2,6 +2,8 @@
#include <string>
#include "tracing/node_trace_buffer.h"
#include "debug_utils.h"
#include "env-inl.h"
namespace node {
namespace tracing {
@@ -53,6 +55,10 @@ Agent::Agent() {
CHECK_EQ(uv_loop_init(&tracing_loop_), 0);
}
Agent::~Agent() {
CheckedUvLoopClose(&tracing_loop_);
}
void Agent::Start() {
if (started_)
return;
+1
View File
@@ -64,6 +64,7 @@ class AgentWriterHandle {
class Agent {
public:
Agent();
~Agent();
TracingController* GetTracingController() { return tracing_controller_; }