Skip to content

Commit

Permalink
agents: use nsuv weak_ptr API's in StatsDAgent
Browse files Browse the repository at this point in the history
PR-URL: #100
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
santigimeno committed Mar 6, 2024
1 parent 0b3347e commit 395d94d
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 121 deletions.
8 changes: 0 additions & 8 deletions agents/statsd/src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ static void Bucket(const FunctionCallbackInfo<Value>& args) {

static void Status(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
if (!StatsDAgent::is_running_) {
args.GetReturnValue().Set(
String::NewFromUtf8(isolate,
"unconfigured",
NewStringType::kNormal).ToLocalChecked());
return;
}

args.GetReturnValue().Set(
String::NewFromUtf8(isolate,
StatsDAgent::Inst()->status().c_str(),
Expand Down
Loading

0 comments on commit 395d94d

Please sign in to comment.