Skip to content

Commit b7345f0

Browse files
authored
fix(csharp/src/Telemetry/Traces/Listeners/FileListener): ensure to flush to file on each line (#4175)
Corrects a bug where the file was not flush, as intended, for each line.
1 parent 9769509 commit b7345f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

csharp/src/Telemetry/Traces/Listeners/FileListener/TracingFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private async Task WriteSingleLineAsync(Stream stream)
127127
}
128128
await stream.CopyToAsync(_currentFileStream).ConfigureAwait(false);
129129
// Flush for robustness to crashing
130-
await stream.FlushAsync().ConfigureAwait(false);
130+
await _currentFileStream.FlushAsync().ConfigureAwait(false);
131131
}
132132

133133
private async Task OpenNewTracingFileAsync()

0 commit comments

Comments
 (0)