mirror of https://github.com/fafhrd91/actix-web
Make guard before io creation when requiring new connection poll
This commit is contained in:
parent
0669ed0f06
commit
e91f13a6b5
|
@ -126,13 +126,12 @@ where
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
Acquire::Available => {
|
Acquire::Available => {
|
||||||
|
let guard = OpenGuard::new(key, inner);
|
||||||
// open tcp connection
|
// open tcp connection
|
||||||
let (io, proto) = connector.call(req).await?;
|
let (io, proto) = connector.call(req).await?;
|
||||||
|
|
||||||
let config = inner.borrow().config.clone();
|
let config = inner.borrow().config.clone();
|
||||||
|
|
||||||
let guard = OpenGuard::new(key, inner);
|
|
||||||
|
|
||||||
if proto == Protocol::Http1 {
|
if proto == Protocol::Http1 {
|
||||||
Ok(IoConnection::new(
|
Ok(IoConnection::new(
|
||||||
ConnectionType::H1(io),
|
ConnectionType::H1(io),
|
||||||
|
|
Loading…
Reference in New Issue