mirror of
https://github.com/szymon-jozef/checkers.git
synced 2026-10-27 19:20:44 +01:00
fix: dont freak out when client loses connection
This commit is contained in:
@@ -22,6 +22,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
break;
|
||||
}
|
||||
|
||||
if buffer == "/test\n" {
|
||||
buffer = String::from("A").repeat(1024 * 1024 * 2);
|
||||
}
|
||||
|
||||
client.send_text_message(buffer.clone()).await;
|
||||
buffer.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user