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 {
|
||||
fn drop(&mut self) {
|
||||
RESPONSE_POOL.with(move |p| {
|
||||
p.release(
|
||||
self.head
|
||||
.take()
|
||||
.expect("ResponseHead is taken before dropped"),
|
||||
)
|
||||
})
|
||||
if let Some(head) = self.head.take() {
|
||||
RESPONSE_POOL.with(move |p| p.release(head))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue