diff --git a/src/net.rs b/src/net.rs index 1ed7486ba6..347334089a 100644 --- a/src/net.rs +++ b/src/net.rs @@ -444,7 +444,7 @@ mod openssl { //} let ssl = try!(Ssl::new(&self.context)); try!(ssl.set_hostname(host)); - SslStream::new(&self.context, stream).map_err(From::from) + SslStream::new_from(ssl, stream).map_err(From::from) } fn wrap_server(&self, stream: HttpStream) -> ::Result {