From 3fc9ca286bd824c866d8af64616198b60bcc07e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eckl=2C=20M=C3=A1t=C3=A9?= <ecklm94@gmail.com>
Date: Thu, 26 May 2016 15:57:33 +0200
Subject: [PATCH] =?UTF-8?q?Le=C3=A1ll=C3=ADt=C3=A1s=20kapcsol=C3=B3=20alap?=
 =?UTF-8?q?j=C3=A1n=20(#8)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 main.cpp | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/main.cpp b/main.cpp
index cd5b0d3..a6a95d8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -167,10 +167,14 @@ int main(int argc, char *argv[])
 	while(true)
 	{
 		server.serve_one_request();
-		log_on_demand(LOG_DEBUG, comm_link.recv_data().c_str());
-		comm_link.send_data("go to hell!");
-		log_on_demand(LOG_DEBUG, "Raising SIGTERM");
-		raise(SIGTERM);
+		if(comm_link.recv_data() == "kill")
+		{
+			comm_link.send_data("go to hell!");
+			log_on_demand(LOG_DEBUG, "Raising SIGTERM");
+			raise(SIGTERM);
+		}
+		else
+			comm_link.send_data("nothing has happened");
 	}
 // ---------------- SERVE END -------------------------
 
-- 
GitLab