diff --git a/src/conn.rs b/src/conn.rs index 236b8f4..9c9545c 100644 --- a/src/conn.rs +++ b/src/conn.rs @@ -16,7 +16,7 @@ impl Connection, BufferedReader> { /// Creates a thread-safe TCP connection to the specified server #[experimental] pub fn connect(host: &str, port: u16) -> IoResult, BufferedReader>> { - let socket = try!(TcpStream::connect(host, port)); + let socket = try!(TcpStream::connect(format!("{}:{}", host, port)[])); Ok(Connection::new(BufferedWriter::new(socket.clone()), BufferedReader::new(socket))) } }