Commit cf7644a5 authored by Thomas Gatzweiler's avatar Thomas Gatzweiler
Browse files

Remove threading for now

parent ba376a9a
use std::io::{self, Write};
use std::net::TcpListener;
use std::thread;
use connection::{Connection, ConnectionType};
use packet::Packet;
......@@ -37,15 +36,12 @@ impl Server {
println!("Incoming connection from {}", addr);
thread::spawn(move || {
let mut connection = Connection::new(
ConnectionType::Server,
stream.try_clone().unwrap(),
);
connection.run(&mut stream);
});
let mut connection = Connection::new(
ConnectionType::Server,
stream.try_clone().unwrap(),
);
connection.run(&mut stream);
}
Ok(())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment