Skip to content

Commit 9ac88f2

Browse files
authored
Close file after writing in server application (#1533)
Fix of mistake leaving file open while reading it again as wav
1 parent 46f5b6c commit 9ac88f2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ int main(int argc, char ** argv) {
456456
// write file to temporary file
457457
std::ofstream temp_file{filename, std::ios::binary};
458458
temp_file << audio_file.content;
459+
temp_file.close();
459460

460461
// read wav content into pcmf32
461462
if (!::read_wav(filename, pcmf32, pcmf32s, params.diarize)) {

0 commit comments

Comments
 (0)