Skip to content

Commit badc5d3

Browse files
dmehalaelsa
authored andcommitted
workaround
1 parent c85660b commit badc5d3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/datadog/datadog_agent.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,11 @@ DatadogAgent::~DatadogAgent() {
184184
Expected<void> DatadogAgent::send(
185185
std::vector<std::unique_ptr<SpanData>>&& spans,
186186
const std::shared_ptr<TraceSampler>& response_handler) {
187-
std::lock_guard<std::mutex> lock(mutex_);
188-
trace_chunks_.push_back(TraceChunk{std::move(spans), response_handler});
187+
{
188+
std::lock_guard<std::mutex> lock(mutex_);
189+
trace_chunks_.push_back(TraceChunk{std::move(spans), response_handler});
190+
}
191+
flush();
189192
return nullopt;
190193
}
191194

0 commit comments

Comments
 (0)