From f00281f2dcd8744e69e4e3ce648c48ffbf3a6ad0 Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Wed, 6 Apr 2022 03:10:02 -0400 Subject: [PATCH] Fix minor bug in server error handling --- src/server.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server.rs b/src/server.rs index f8b523e..842d6f7 100644 --- a/src/server.rs +++ b/src/server.rs @@ -73,7 +73,11 @@ impl Server { Ok(listener) => listener, Err(_) => { warn!(?port, "could not bind to local port"); - send_json(&mut stream, "port already in use").await?; + send_json( + &mut stream, + ServerMessage::Error("port already in use".into()), + ) + .await?; return Ok(()); } };