Skip to content

Commit b19466b

Browse files
dmehalaelsa
authored andcommitted
workaround
1 parent e14a5a4 commit b19466b

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
@@ -185,8 +185,11 @@ DatadogAgent::~DatadogAgent() {
185185
Expected<void> DatadogAgent::send(
186186
std::vector<std::unique_ptr<SpanData>>&& spans,
187187
const std::shared_ptr<TraceSampler>& response_handler) {
188-
std::lock_guard<std::mutex> lock(mutex_);
189-
trace_chunks_.push_back(TraceChunk{std::move(spans), response_handler});
188+
{
189+
std::lock_guard<std::mutex> lock(mutex_);
190+
trace_chunks_.push_back(TraceChunk{std::move(spans), response_handler});
191+
}
192+
flush();
190193
return nullopt;
191194
}
192195

0 commit comments

Comments
 (0)