mirror of https://github.com/fafhrd91/actix-web
revert change of ResponseHead
This commit is contained in:
parent
0819cfbe7b
commit
e5cf2abf0a
|
@ -414,13 +414,9 @@ impl std::ops::DerefMut for BoxedResponseHead {
|
||||||
|
|
||||||
impl Drop for BoxedResponseHead {
|
impl Drop for BoxedResponseHead {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
RESPONSE_POOL.with(move |p| {
|
if let Some(head) = self.head.take() {
|
||||||
p.release(
|
RESPONSE_POOL.with(move |p| p.release(head))
|
||||||
self.head
|
}
|
||||||
.take()
|
|
||||||
.expect("ResponseHead is taken before dropped"),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue