aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHui Li <herdingcat@yahoo.com>2024-01-06 14:28:18 -0500
committerHui Li <herdingcat@yahoo.com>2024-01-06 14:28:18 -0500
commit320a12809311b7ef135f3f11a9eaf1f71893496f (patch)
tree77294d7a1f33c2318c4eb9643712c9aa37f84810
parentb7b5ca240afe1e6481bbfea509f8d5807c544ea3 (diff)
downloadmcelog-320a12809311b7ef135f3f11a9eaf1f71893496f.tar.gz
address comments
-rw-r--r--client.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/client.c b/client.c
index 7a6803e..58ea2f7 100644
--- a/client.c
+++ b/client.c
@@ -65,10 +65,8 @@ void ask_server(char *command)
fputs(buf, stdout);
- /* we want to show the string pong before exiting the loop */
if (n >= 5 && !memcmp(buf + n - 5, "pong\n", 5)) {
- fclose(fp);
- return;
+ fflush(stdout);
}
}
fclose(fp);