Update server_v3.rs

fixed the start function
This commit is contained in:
michael-bailey 2020-09-27 16:54:18 +01:00 committed by michael bailey
parent b98ce05d32
commit cae3a81cfb
1 changed files with 2 additions and 1 deletions

View File

@ -242,10 +242,11 @@ impl Server {
#[allow(dead_code)]
pub fn start(&mut self) -> Result<(), io::Error> {
let listener = TcpListener::bind(self.address)?;
let listener = TcpListener::bind(&self.address)?;
listener.set_nonblocking(true)?;
self.listener = Some(listener);
Ok(())
}
#[allow(dead_code)]