hyperium / h2

HTTP 2.0 client & server implementation for Rust.
MIT License
1.35k stars 270 forks source link

Fix potential hang if extensions contain same StreamRef #553

Closed seanmonstar closed 3 years ago

seanmonstar commented 3 years ago

If a user stored a StreamRef to the same stream in the request or response extensions, they would be dropped while the internal store lock was held. That would lead to a deadlock, since dropping a stream ref will try to take the store lock to clean up.

Clear extensions of Request and Response before locking store, prevent this.

Fixes hyperium/hyper#2621