Pārlūkot izejas kodu

[server] flush stdout before writing results to socket

Simon Krajewski 3 gadi atpakaļ
vecāks
revīzija
6212d7c68d
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      src/compiler/server.ml

+ 1 - 0
src/compiler/server.ml

@@ -566,6 +566,7 @@ let mk_length_prefixed_communication allow_nonblock chin chout =
 	let write = Buffer.add_string bout in
 
 	let close = fun() ->
+		flush stdout;
 		IO.write_i32 chout (Buffer.length bout);
 		IO.nwrite_string chout (Buffer.contents bout);
 		IO.flush chout