Skip to content

Commit

Permalink
Fix minor bug in server error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhang committed Apr 6, 2022
1 parent 9a8fc8e commit f00281f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(());
}
};
Expand Down

0 comments on commit f00281f

Please sign in to comment.