From 437c6fc277249dbf253d4c8d1033d136feacf472 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Mon, 10 Oct 2022 17:21:42 +0100 Subject: [PATCH] pro: Stop closing stdout early This was causing a race-condition where sometimes the response body would not get printed. Co-authored-by: Ali Mohammad Pur --- Userland/Utilities/pro.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Utilities/pro.cpp b/Userland/Utilities/pro.cpp index d761a5c27d..4c450c6907 100644 --- a/Userland/Utilities/pro.cpp +++ b/Userland/Utilities/pro.cpp @@ -329,7 +329,6 @@ ErrorOr serenity_main(Main::Arguments arguments) dbgln("started request with id {}", request->id()); auto rc = loop.exec(); - // FIXME: This shouldn't be needed. - fclose(stdout); + fflush(stdout); return rc; }