mirror of
https://github.com/fafhrd91/actix-net
synced 2025-02-20 11:00:31 +01:00
fix actix-tls build (#252)
This commit is contained in:
parent
a633d2353c
commit
feac376c17
@ -172,17 +172,3 @@ fn attack_to_tokio() {
|
|||||||
|
|
||||||
assert_eq!(res, 2);
|
assert_eq!(res, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
|
||||||
async fn attack_to_tokio_macro() {
|
|
||||||
use actix_rt::System;
|
|
||||||
|
|
||||||
let rest_operations = run_application();
|
|
||||||
let res = System::attach_to_tokio(
|
|
||||||
"actix-main-system",
|
|
||||||
tokio::runtime::Runtime::handle(&self),
|
|
||||||
rest_operations,
|
|
||||||
);
|
|
||||||
|
|
||||||
assert_eq!(res, 2);
|
|
||||||
}
|
|
||||||
|
@ -86,7 +86,7 @@ where
|
|||||||
|
|
||||||
fn call(&self, stream: Connection<T, U>) -> Self::Future {
|
fn call(&self, stream: Connection<T, U>) -> Self::Future {
|
||||||
trace!("SSL Handshake start for: {:?}", stream.host());
|
trace!("SSL Handshake start for: {:?}", stream.host());
|
||||||
let (io, stream) = stream.replace(());
|
let (io, stream) = stream.replace_io(());
|
||||||
let host = stream.host();
|
let host = stream.host();
|
||||||
|
|
||||||
let config = self
|
let config = self
|
||||||
@ -123,7 +123,7 @@ where
|
|||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
let stream = this.stream.take().unwrap();
|
let stream = this.stream.take().unwrap();
|
||||||
trace!("SSL Handshake success: {:?}", stream.host());
|
trace!("SSL Handshake success: {:?}", stream.host());
|
||||||
Poll::Ready(Ok(stream.replace(this.io.take().unwrap()).1))
|
Poll::Ready(Ok(stream.replace_io(this.io.take().unwrap()).1))
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
trace!("SSL Handshake error: {:?}", e);
|
trace!("SSL Handshake error: {:?}", e);
|
||||||
|
@ -86,7 +86,7 @@ where
|
|||||||
|
|
||||||
fn call(&self, stream: Connection<T, U>) -> Self::Future {
|
fn call(&self, stream: Connection<T, U>) -> Self::Future {
|
||||||
trace!("SSL Handshake start for: {:?}", stream.host());
|
trace!("SSL Handshake start for: {:?}", stream.host());
|
||||||
let (io, stream) = stream.replace(());
|
let (io, stream) = stream.replace_io(());
|
||||||
let host = DNSNameRef::try_from_ascii_str(stream.host())
|
let host = DNSNameRef::try_from_ascii_str(stream.host())
|
||||||
.expect("rustls currently only handles hostname-based connections. See https://github.com/briansmith/webpki/issues/54");
|
.expect("rustls currently only handles hostname-based connections. See https://github.com/briansmith/webpki/issues/54");
|
||||||
ConnectAsyncExt {
|
ConnectAsyncExt {
|
||||||
@ -113,6 +113,6 @@ where
|
|||||||
let stream = ready!(Pin::new(&mut this.fut).poll(cx))?;
|
let stream = ready!(Pin::new(&mut this.fut).poll(cx))?;
|
||||||
let s = this.stream.take().unwrap();
|
let s = this.stream.take().unwrap();
|
||||||
trace!("SSL Handshake success: {:?}", s.host());
|
trace!("SSL Handshake success: {:?}", s.host());
|
||||||
Poll::Ready(Ok(s.replace(stream).1))
|
Poll::Ready(Ok(s.replace_io(stream).1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user