Skip to content

Commit 7fc8b48

Browse files
viMichael Eden
authored and
Michael Eden
committed
Return Box<... + Send> from ClientBuilder::connect
Make it actually useful in multi-threaded environment.
1 parent fbdbc62 commit 7fc8b48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/builder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,10 @@ impl<'u> ClientBuilder<'u> {
392392
pub fn connect(
393393
&mut self,
394394
ssl_config: Option<SslConnector>,
395-
) -> WebSocketResult<Client<Box<NetworkStream>>> {
395+
) -> WebSocketResult<Client<Box<NetworkStream + Send>>> {
396396
let tcp_stream = try!(self.establish_tcp(None));
397397

398-
let boxed_stream: Box<NetworkStream> = if
398+
let boxed_stream: Box<NetworkStream + Send> = if
399399
self.url.scheme() == "wss" {
400400
Box::new(try!(self.wrap_ssl(tcp_stream, ssl_config)))
401401
} else {

0 commit comments

Comments
 (0)