From 7fc8b48aee625a31c29fd9e979fbfca5ca0e7d4a Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Fri, 19 May 2017 02:12:24 +0300 Subject: [PATCH] Return Box<... + Send> from ClientBuilder::connect Make it actually useful in multi-threaded environment. --- src/client/builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/builder.rs b/src/client/builder.rs index 7c6146672b..3807ae8217 100644 --- a/src/client/builder.rs +++ b/src/client/builder.rs @@ -392,10 +392,10 @@ impl<'u> ClientBuilder<'u> { pub fn connect( &mut self, ssl_config: Option, - ) -> WebSocketResult>> { + ) -> WebSocketResult>> { let tcp_stream = try!(self.establish_tcp(None)); - let boxed_stream: Box = if + let boxed_stream: Box = if self.url.scheme() == "wss" { Box::new(try!(self.wrap_ssl(tcp_stream, ssl_config))) } else {