Skip to content

Commit 8c6853a

Browse files
authored
need to get the chrome tracing lock when flushing the trace file (#422)
1 parent a99ce7c commit 8c6853a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intercept/src/chrometracer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,9 @@ class CChromeTracer
366366

367367
std::ostream& flush()
368368
{
369+
std::lock_guard<std::mutex> lock(m_Mutex);
369370
if( m_RecordBuffer.size() > 0 )
370371
{
371-
std::lock_guard<std::mutex> lock(m_Mutex);
372372
flushRecords();
373373
}
374374
return m_TraceFile.flush();

0 commit comments

Comments
 (0)