Fix minor bug in server error handling

This commit is contained in:
Eric Zhang 2022-04-06 03:10:02 -04:00
parent 9a8fc8ec44
commit f00281f2dc
1 changed files with 5 additions and 1 deletions

View File

@ -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(());
}
};