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

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