Skip to content

Commit 9e5d887

Browse files
committed
Try locking the mutex on delete, just in case process_dns_layer is running while the bucket is aged out
1 parent 00a2b93 commit 9e5d887

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/handlers/dns/v1/DnsStreamHandler.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ class DnsMetricsBucket final : public visor::AbstractMetricsBucket
171171
set_num_sample_info(DNS_SCHEMA, {"wire_packets", "deep_samples"}, "Total DNS wire packets that were sampled for deep inspection");
172172
}
173173

174+
~DnsMetricsBucket()
175+
{
176+
std::unique_lock lock(_mutex);
177+
}
178+
174179
auto get_xact_data_locked() const
175180
{
176181
std::shared_lock lock(_mutex);

0 commit comments

Comments
 (0)