diff --git a/src/client/conn.rs b/src/client/conn.rs index 097b268..49ad4b3 100644 --- a/src/client/conn.rs +++ b/src/client/conn.rs @@ -119,7 +119,7 @@ impl Connection { println!("Added {} to trusted certificates.", cert_path); } let connector = builder.build()?; - let stream = TcpStream::connect(&config.socket_addr(), handle) + let stream = Box::new(TcpStream::connect(&config.socket_addr(), handle) .map_err(|e| { let res: error::Error = e.into(); res @@ -128,8 +128,8 @@ impl Connection { connector.connect_async(&domain, socket).map_err( |e| e.into(), ) - }) - .boxed(); + } + )); Ok(ConnectionFuture::Secured(config, stream)) } else { Ok(ConnectionFuture::Unsecured( diff --git a/src/client/server/mod.rs b/src/client/server/mod.rs index 0532b32..b72cee0 100644 --- a/src/client/server/mod.rs +++ b/src/client/server/mod.rs @@ -121,7 +121,7 @@ impl<'a> Server for ServerState { { let msg = &msg.into(); self.handle_sent_message(&msg)?; - Ok((&self.outgoing).send( + Ok((&self.outgoing).unbounded_send( ServerState::sanitize(&msg.to_string()) .into(), )?)