Skip to content

Commit

Permalink
fix(prometheus): join prometheus server thread on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
dnut committed Dec 22, 2023
1 parent 9cd4be0 commit 47dce1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cmd/cmd.zig
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fn gossip(_: []const []const u8) !void {

// var logger: Logger = .noop;

_ = try spawnMetrics(gpa_allocator);
const metrics_thread = try spawnMetrics(gpa_allocator);

var my_keypair = try getOrInitIdentity(gpa_allocator, logger);

Expand Down Expand Up @@ -134,6 +134,7 @@ fn gossip(_: []const []const u8) !void {
);

handle.join();
metrics_thread.detach();
}

/// Initializes the global registry. Returns error if registry was already initialized.
Expand Down

0 comments on commit 47dce1a

Please sign in to comment.