mirror of https://github.com/fafhrd91/actix-web
fix(awc): close connections after GO_AWAY local or remote GO_AWAY errors (#3790)
This commit is contained in:
parent
fde7934243
commit
016841137e
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- Fix a bug where `GO_AWAY` errors did not stop connections from returning to the pool.
|
||||||
|
|
||||||
## 3.8.0
|
## 3.8.0
|
||||||
|
|
||||||
- Add `hickory-dns` crate feature (off-by-default).
|
- Add `hickory-dns` crate feature (off-by-default).
|
||||||
|
|
|
@ -107,7 +107,7 @@ where
|
||||||
|
|
||||||
let res = poll_fn(|cx| io.poll_ready(cx)).await;
|
let res = poll_fn(|cx| io.poll_ready(cx)).await;
|
||||||
if let Err(err) = res {
|
if let Err(err) = res {
|
||||||
io.on_release(err.is_io());
|
io.on_release(err.is_io() || err.is_go_away());
|
||||||
return Err(SendRequestError::from(err));
|
return Err(SendRequestError::from(err));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ where
|
||||||
fut.await.map_err(SendRequestError::from)?
|
fut.await.map_err(SendRequestError::from)?
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
io.on_release(err.is_io());
|
io.on_release(err.is_io() || err.is_go_away());
|
||||||
return Err(err.into());
|
return Err(err.into());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue