From 221fcd6e0cb305829c5982d73d6b69c269920bda Mon Sep 17 00:00:00 2001 From: Florian Fischer <florian.fl.fischer@fau.de> Date: Mon, 19 Apr 2021 12:54:07 +0200 Subject: [PATCH] [EchoServer] fix echo function The break was not in the right scope and thus exiting the echo loop immediately in the first iteration. --- apps/EchoServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/EchoServer.cpp b/apps/EchoServer.cpp index e814b4a5..081f7c85 100644 --- a/apps/EchoServer.cpp +++ b/apps/EchoServer.cpp @@ -58,8 +58,8 @@ auto main(int argc, char* argv[]) -> int { if (bytes_recv < 0) { LOGE("server read failed:" << strerror(errno)); } + break; } - break; if (unlikely(bytes_recv == 5 && strncmp("quit\n", buf, bytes_recv) == 0)) { quit = true; -- GitLab