From dece6fa7ce6f8ede9b0498dccf5b1a0e5882aad9 Mon Sep 17 00:00:00 2001 From: rasul Date: Mon, 6 Apr 2020 10:18:56 -0500 Subject: [PATCH] watch for the correct string, and use client.close() --- src/game/iter_once.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/iter_once.rs b/src/game/iter_once.rs index 03cc114..3ed6060 100644 --- a/src/game/iter_once.rs +++ b/src/game/iter_once.rs @@ -36,7 +36,8 @@ impl Game { client.send_with_prompt(message); } else { client.send_without_prompt(&message); - if message == "Goodbye".to_string() { + if message == "Goodbye\n\n".to_string() { + let _ = client.close(); log::info!("Disconnect from {}", client); self.clients.remove(&token); self.tokens.push_back(token);