Skip to content

Commit

Permalink
Update examples/ping-pong/src/server.rs
Browse files Browse the repository at this point in the history
Co-authored-by: pythcoiner <[email protected]>
  • Loading branch information
plebhash and pythcoiner authored Jun 20, 2024
1 parent 40c54e9 commit 96002b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/ping-pong/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub fn start_server(address: &str) -> Result<(), Error> {
match stream {
Ok(stream) => {
thread::spawn(|| {
handle_client(stream)?;
handle_connection(stream)?;
Ok::<(), Error>(())
});
}
Expand All @@ -31,7 +31,7 @@ pub fn start_server(address: &str) -> Result<(), Error> {
Ok(())
}

fn handle_client(mut stream: TcpStream) -> Result<(), Error> {
fn handle_connection(mut stream: TcpStream) -> Result<(), Error> {
// first, we need to read the ping message

// initialize decoder
Expand Down

0 comments on commit 96002b8

Please sign in to comment.